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" | |
| "time" | |
| "rand" | |
| "runtime" | |
| ) | |
| func main() { |
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" | |
| "time" | |
| "rand" | |
| "sync" | |
| "runtime" | |
| ) |
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
| go func(ws *websocket.Conn, ch chan bool) { | |
| var prev []string | |
| var vals []string | |
| for ;; { | |
| f,e := os.Open("/proc/stat") | |
| if e != nil { | |
| return | |
| } | |
| defer f.Close() |
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 ( | |
| "http" | |
| ) | |
| func main() { | |
| http.Handle("/foo/", http.StripPrefix("/foo", http.FileServer(http.Dir("/xyz/foo/")))) | |
| http.ListenAndServe(":6543", nil) | |
| } |
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
| import simplejson as json | |
| from encoder.MetadataEncoder import MetadataJSONEncoder | |
| def main(): | |
| r = Raaga() | |
| ids = r.get_movie_ids() | |
| m = [] | |
| for i in xrange(0, len(ids)): | |
| try: | |
| m.append(r.get_movie_info(ids[i])) |
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
| prudhvi@SUN ~ λ ➔ /sbin/ifconfig | grep -E '^\S' | awk '{ print $1, $NF }' | |
| br0 00:00:00:00:00:01 | |
| eth1 3e:f2:8c:56:63:f2 | |
| eth2 76:84:89:59:78:42 | |
| eth3 3a:91:d0:3c:f6:04 | |
| eth4 e6:0f:6c:0d:db:e2 | |
| lo Loopback | |
| tap0 00:00:00:00:00:01 | |
| tap1 00:00:00:00:00:02 | |
| tun0 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 |
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
| set -g status-bg black | |
| set -g status-fg white | |
| set -g status-utf8 on | |
| set -g status-left '#[fg=green] @#H#[default]' | |
| set-window-option -g window-status-current-bg red | |
| set -g status-right '#[fg=yellow]#(cut -d " " -f 1-3 /proc/loadavg) #[fg=green]%H:%M#[default]' | |
| bind | split-window -h | |
| bind - split-window -v | |
| bind h select-pane -L | |
| bind j select-pane -D |
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
| #include <stdio.h> | |
| void a(){ | |
| char x[] = "aabbcc\0"; | |
| char y[] = "ccbbaa\0"; | |
| } | |
| void b(){ | |
| char x[] = "ccbbaa\0"; | |
| char y[] = "aabbcc\0"; |
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
| location /foo/([a-zA-Z0-9]+)/bar/([0-9]+) { | |
| my_module on; | |
| my_module_first $1; | |
| my_module_second $2; | |
| } |
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
| ; boot.asm | |
| ; BIOS loads boot sector at 0000:7c00 | |
| mov ds, 0x07c0 | |
| mov ah, 0x0 | |
| mov al, 0x6a | |
| int 0x10 | |
| xor cx, cx | |
| begin: |
OlderNewer