This file contains 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/bin/python | |
# | |
# Show current CPU temperature | |
# | |
import os | |
import json | |
cpu_temp = float(os.popen('cat /sys/class/thermal/thermal_zone0/temp').read()) / 1000 |
This file contains 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 -e | |
#/etc/rc.local | |
echo "1024" > /proc/sys/net/core/somaxconn | |
echo "1" > /proc/sys/net/ipv4/tcp_syncookies | |
echo "4096 87380 16777216" > /proc/sys/net/ipv4/tcp_rmem | |
echo "4096 65536 16777216" > /proc/sys/net/ipv4/tcp_wmem | |
echo "0" > /proc/sys/net/ipv4/tcp_timestamps | |
echo "30" > /proc/sys/net/ipv4/tcp_fin_timeout | |
echo "5" > /proc/sys/net/ipv4/tcp_keepalive_probes | |
echo "15" > /proc/sys/net/ipv4/tcp_keepalive_intvl |
This file contains 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
# /etc/security/limits.conf | |
#<domain> <type> <item> <value> | |
* - nofile 100000 | |
* - nproc 104448 | |
root - nofile 100000 | |
# End of file |
This file contains 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
/** | |
* An Handlebars helper to format numbers | |
* | |
* This helper have these three optional parameters: | |
* @var decimalLength int The length of the decimals | |
* @var thousandsSep char The thousands separator | |
* @var decimalSep char The decimals separator | |
* | |
* Based on: | |
* - mu is too short: http://stackoverflow.com/a/14493552/369867 |
NewerOlder