Skip to content

Instantly share code, notes, and snippets.

View BAGELreflex's full-sized avatar

Aaron St. Clair BAGELreflex

  • ECR Software Corporation
  • Boone, NC
View GitHub Profile
<?php
$section1min = 1;
$section1max = 12;
$section2min = 25;
$section2max = 36;
$line1min = 14;
$line1max = 17;
$line2min = 20;
$line2max = 24;
@BAGELreflex
BAGELreflex / cdm_fio.sh
Created December 23, 2019 16:25
Reproducing CrystalDiskMark tests with fio - further fixes for CentOS7
#!/bin/bash
# This script is based on https://unix.stackexchange.com/revisions/480191/9 .
# The following changes proved to be necessary to make it work on CentOS 7:
# * removed disk info (model, size) - not very useful, might not work in many cases.
# * using "bw" instead of "bw_bytes" to support fio version 3.1 (those availible through yum @base)
# * escaping exclamation mark in sed command
# * the ".fiomark.txt" is not auto-removed
# * remove bw_bytes result for READ so that only 1 value in MB is returned
# * split fio operation based on --size to prevent error with "fio: size too small, must not be less than minimum block size: 1024 < 524288"
diff --git a/user/classes/output/myprofile/renderer.php b/user/classes/output/myprofile/renderer.php
index c463496..d330fe8 100644
--- a/user/classes/output/myprofile/renderer.php
+++ b/user/classes/output/myprofile/renderer.php
@@ -60,7 +60,7 @@ class renderer extends \plugin_renderer_base {
public function render_category(category $category) {
$classes = $category->classes;
if (empty($classes)) {
- $return = \html_writer::start_tag('section', array('class' => 'node_category'));
+ $return = \html_writer::start_tag('section', array('class' => 'node_category', 'style' => 'border: 1px solid #F1F2F2; padding: 10px; margin-bottom: 20px;'));
diff --git a/user/classes/output/myprofile/renderer.php b/user/classes/output/myprofile/renderer.php
index c463496..d330fe8 100644
--- a/user/classes/output/myprofile/renderer.php
+++ b/user/classes/output/myprofile/renderer.php
@@ -60,7 +60,7 @@ class renderer extends \plugin_renderer_base {
public function render_category(category $category) {
$classes = $category->classes;
if (empty($classes)) {
- $return = \html_writer::start_tag('section', array('class' => 'node_category'));
+ $return = \html_writer::start_tag('section', array('class' => 'node_category', 'style' => 'border: 1px solid #F1F2F2; padding: 10px; margin-bottom: 20px;'));
ifeq ($(RTCONFIG_GETREALIP),y)
mkdir -p $(INSTALLDIR)/usr/sbin
install -m 0755 apps_scripts/getrealip.sh $(INSTALLDIR)/usr/sbin/getrealip.sh
endif
install -m 0755 webs_scripts/GoogleDNS_Update.sh $(INSTALLDIR)/usr/sbin
# Mod to load prebuilt scripts
echo -e "Adding default configs and scripts to rom"
mkdir -p $(INSTALLDIR)/rom/configs
<!DOCTYPE html>
<html>
<!-- Body tag by default has padding; we remove it here for better compatability -->
<body style="margin: 0; padding: 0;">
<!-- Remove cellpadding and spacing. Add 25px top/bottom margin, and make left/right be auto to center the table -->
<table cellspacing="0" cellpadding="0" style="margin: 25px auto;">
<tbody>
<tr>
<!-- The align attribute makes this work in older clients; the style text align works in newer clients -->
<td align="center" style="text-align: center;">
+------------+--------+---------------------+
| tup_ticket | tup_id | created_at |
+------------+--------+---------------------+
| 277744 | 1 | 2015-04-02 14:07:21 |
| 277744 | 2 | 2015-04-02 14:08:31 |
| 277744 | 3 | 2015-04-02 14:17:05 |
| 277745 | 1 | 2015-04-02 14:16:49 |
| 277745 | 2 | 2015-04-02 14:16:49 |
| 277745 | 3 | 2015-04-02 14:17:44 |
| 277745 | 4 | 2015-04-02 14:18:10 |