Skip to content

Instantly share code, notes, and snippets.

View DennyLoko's full-sized avatar
🌟
GitHub Gold Member

Danniel Magno DennyLoko

🌟
GitHub Gold Member
View GitHub Profile
#!/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
#!/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
# /etc/security/limits.conf
#<domain> <type> <item> <value>
* - nofile 100000
* - nproc 104448
root - nofile 100000
# End of file
@DennyLoko
DennyLoko / numberFormatHelper.js
Last active March 14, 2025 19:36
numberFormat Handlebars helper
/**
* 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