Very easy example for cpu usage chart with d3.js
A Pen by CarterTsai on CodePen.
/*! | |
* gulp | |
* $ npm install gulp-ruby-sass gulp-autoprefixer gulp-cssnano gulp-jshint gulp-concat gulp-uglify gulp-imagemin gulp-notify gulp-rename gulp-livereload gulp-cache del --save-dev | |
*/ | |
// Load plugins | |
var gulp = require('gulp'), | |
sass = require('gulp-ruby-sass'), | |
autoprefixer = require('gulp-autoprefixer'), | |
cssnano = require('gulp-cssnano'), |
Very easy example for cpu usage chart with d3.js
A Pen by CarterTsai on CodePen.
#!/bin/bash | |
# | |
if [ -z "$APIKEY" ]; then | |
echo "API Key for Redmine is required." | |
exit 1 | |
fi | |
mkdir -p doc/specs | |
cd doc/specs |
#!/bin/bash | |
# Usage: slackpost <token> <channel> <message> | |
# Enter the name of your slack host here - the thing that appears in your URL: | |
# https://slackhost.slack.com/ | |
slackhost=PUT_YOUR_HOST_HERE | |
token=$1 |
#!/bin/bash | |
# Personal note : add rules to /etc/rc.local file so they will be loaded after booting up | |
# Change modemif to your network interface value | |
modemif=eth0 | |
iptables -t mangle -N ack | |
iptables -t mangle -A ack -m tos ! --tos Normal-Service -j RETURN | |
iptables -t mangle -A ack -p tcp -m length --length 0:128 -j TOS --set-tos Minimize-Delay | |
iptables -t mangle -A ack -p tcp -m length --length 128: -j TOS --set-tos Maximize-Throughput |
#!/bin/sh | |
# kill already process | |
PROC=`pgrep -f inotifywait` | |
if [ -n "${PROC}" ]; then | |
echo $PROC | xargs kill | |
fi | |
/usr/bin/inotifywait -e create,modify -mrq /home/my.file | while read line; do | |
path=`echo $line | /bin/awk '{print $1$3}'` |
#file /etc/init.d/6bridge | |
#!/bin/sh /etc/rc.common | |
START=46 | |
STOP=46 | |
start_service() { | |
local section="$1" | |
. /lib/functions/network.sh |
# http://wiki.openwrt.org/doc/devel/packages | |
include $(TOPDIR)/rules.mk | |
# PKG_NAME -The name of the package, as seen via menuconfig and ipkg | |
PKG_NAME:=bridge | |
# PKG_VERSION -The upstream version number that we're downloading | |
PKG_VERSION:=1.0.6 | |
# PKG_RELEASE -The version of this package Makefile | |
PKG_RELEASE:=1 |
var dgram = require('dgram'); | |
var socket = dgram.createSocket('udp4'); | |
var testMessage = "[hello world] pid: " + process.pid; | |
var multicastAddress = '239.1.2.3'; | |
var multicastPort = 5554; | |
socket.bind(multicastPort, '0.0.0.0'); | |
socket.addMembership(multicastAddress); |
#!/bin/sh | |
# USAGE: ./watchrun.sh COMMAND | |
# New credit to: http://exyr.org/2011/inotify-run/ | |
# this script will wait for changes in the current directory tree, and when one occurs, it will run COMMAND, then resume waiting | |
# requires inotify-tools: | |
# sudo apt-get install inotify-tools | |
# or: |