"mysql is a network-attached spreadsheet used by porn sites and other dodgy entities across the Internet." -- http://elnur.pro/avoid-mysql/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Given this input string, tidy_bytes explodes | |
#L 04/22/2013 - 19:56:11: "★radist★<14><STEAM_0:0:21110245><Red>" say_team "[P-REC] Çàïèñü ïîù¸ëú" | |
#This horrible monkey patch fixes it: | |
module ActiveSupport | |
module Multibyte | |
module Unicode | |
def tidy_byte(byte) | |
if byte.is_a? Integer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
`pip install flent matplotlib` | |
`brew install fping` | |
Netperf in homebrew is installed without demo mode by default, so we need to edit the recipe slightly, also demo mode fails to build under OS/X, requiring a tiny patch to netlib.c ( http://www.netperf.org/pipermail/netperf-talk/2013-December/001162.html ). The following recipe changes the URL to a prepatched version that I host and changes the configure line to enable demo mode. | |
`brew edit netperf` | |
``` | |
class Netperf < Formula | |
desc "Benchmarks performance of many different types of networking" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/usr/local/bin/speedtest-cli --server 13379 --csv >> /usr/share/cacti/site/scripts/speedtest.csv |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'csv' | |
last_result = `tail -n1 /usr/share/cacti/site/scripts/speedtest.csv` | |
def bits_to_mbit(bits) | |
bits / 1024.0 / 1024.0 | |
end | |
CSV.parse(last_result) do |row| | |
@ping = row[5].to_f |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CPU 0 Unable to handle kernel paging request at virtual address 00000000, epc == c016c184, r | |
a == 802b72c0 | |
Oops[#1]: | |
CPU: 0 PID: 120 Comm: modprobe Tainted: P O 3.10.14-UBNT #2 | |
task: 8f501b28 ti: 8f4d2000 task.ti: 8f4d2000 | |
$ 0 : 00000000 00000065 00000002 00000000 | |
$ 4 : 80485b40 00000001 00000000 ffffffff | |
$ 8 : 00000000 80219ab0 20636972 000000ac | |
$12 : 76207265 00000006 00000000 69737265 | |
$16 : c0171d80 8f47e180 80485b40 8fcd6b0c |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CONFIG_TARGET_ramips=y | |
CONFIG_TARGET_ramips_mt7621=y | |
CONFIG_TARGET_ramips_mt7621_DEVICE_ubnt-erx=y | |
# CONFIG_FEED_luci is not set | |
# CONFIG_FEED_packages is not set | |
# CONFIG_FEED_routing is not set | |
# CONFIG_FEED_telephony is not set | |
CONFIG_IMAGEOPT=y | |
CONFIG_LUCI_LANG_de=y | |
CONFIG_LUCI_LANG_en=y |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11111110 = fe = cores 1-7 | |
11110000 = f0 = cores 4-7 (2.3Ghz fast) | |
11000000 = c0 = core 6+7 | |
00110000 = 30 = core 4+5 | |
11100000 = e0 = core 5+6+7 | |
00001111 = f = cores 0-3 (1.8Ghz efficient) | |
00001110 = e = core 1+2+3 | |
00001100 = c = core 2+3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
get_device_irq() { | |
local device="$1" | |
local line | |
local seconds="0" | |
# wait up to 10 seconds for the irq/device to appear | |
while [ "${seconds}" -le 10 ]; do | |
line=$(grep -m 1 "${device}\$" /proc/interrupts) && break |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo performance > /sys/devices/system/cpu/cpufreq/policy0/scaling_governor | |
echo performance > /sys/devices/system/cpu/cpufreq/policy4/scaling_governor | |
echo performance > /sys/devices/system/cpu/cpufreq/policy6/scaling_governor | |
###### | |
echo ondemand > /sys/devices/system/cpu/cpufreq/policy0/scaling_governor | |
echo ondemand > /sys/devices/system/cpu/cpufreq/policy4/scaling_governor | |
echo ondemand > /sys/devices/system/cpu/cpufreq/policy6/scaling_governor | |
echo 10 > /sys/devices/system/cpu/cpufreq/policy0/ondemand/up_threshold |
OlderNewer