A demonstration of D3’s vertically-oriented bullet charts, based on this example.
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
| package main | |
| import ( | |
| "log" | |
| "net/mail" | |
| "encoding/base64" | |
| "net/smtp" | |
| "fmt" | |
| "strings" |
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
| package main | |
| import ( | |
| "encoding/json" | |
| "log" | |
| "net/http" | |
| "reflect" | |
| "time" | |
| "github.com/gorilla/context" |
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
| package main | |
| import ( | |
| "fmt" | |
| "reflect" | |
| ) | |
| type boy struct { | |
| Name string | |
| age int |
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
| sudo install -o root -g root -m 0600 /dev/null /swapfile | |
| dd if=/dev/zero of=/swapfile bs=1k count=2048k | |
| mkswap /swapfile | |
| swapon /swapfile | |
| echo "/swapfile swap swap auto 0 0" | sudo tee -a /etc/fstab | |
| sudo sysctl -w vm.swappiness=10 | |
| echo vm.swappiness = 10 | sudo tee -a /etc/sysctl.conf |
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
| package main | |
| import ( | |
| "flag" | |
| "fmt" | |
| "log" | |
| "net/http" | |
| "runtime" | |
| "time" |
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
| ps -ef | grep tomcat | awk '{print $2}' | xargs kill -9 |
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
| # a little chat room use eventmachine | |
| require 'rubygems' | |
| require 'eventmachine' | |
| require 'em-http' # gem install em-http-request | |
| require 'yajl' # gem install yajl-ruby | |
| class String | |
| def bold | |
| "\033[1m#{self}\033[0m" | |
| end |
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
| iTerm2 emacs 24.2.1 -nw with paredit on OS X 10.8 Norwegian layout | |
| Left Command is my Meta. | |
| Left Alt used for inputting special characters. | |
| Caps Lock is mapped to Control. | |
| > System Preferences > Keyboard > Keyboard > Special: Caps Lock: ^ Control | |
| iTerm > Preferences > Keys: Left Command key mapped to Right Option | |
| iTerm > Preferences > Profiles > Keys: Right option acts as: +Esc |
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/bin/env python | |
| # -*- coding: utf-8 -*- | |
| import subprocess | |
| import re | |
| ntfs_pattern = re.compile(r'File System Personality: NTFS') | |
| ntfs_device_node = re.compile(r'.*Device Node:.*') | |
| device_dict = {} |
NewerOlder