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
package main | |
import ( | |
"flag" | |
"fmt" | |
) | |
type Config struct { | |
A *string | |
B *int |
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
function u2d () { | |
if [[ $# > 0 ]]; then | |
date -u -Iseconds -d @$1 | |
else | |
date -u -Iseconds | |
fi | |
} | |
function d2u () { | |
if [[ $# > 0 ]]; then |
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
package main | |
import ( | |
"fmt" | |
"time" | |
) | |
func main() { | |
c := make(chan string, 1) | |
go func() { c <- mysleep() }() |
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 | |
git ls-tree -r $1 | grep $2 | awk '{print $3}' | xargs git cat-file blob |
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
abraithwaite@jessie qwer]$ cat asdf.zip | |
version https://git-lfs.github.com/spec/v1 | |
oid sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 | |
size 0 | |
[abraithwaite@jessie qwer]$ git status | |
On branch qwer | |
Changes not staged for commit: | |
(use "git add <file>..." to update what will be committed) | |
(use "git checkout -- <file>..." to discard changes in working directory) |
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
[ 0.000000] Booting Linux on physical CPU 0x0 | |
[ 0.000000] Initializing cgroup subsys cpuset | |
[ 0.000000] Initializing cgroup subsys cpu | |
[ 0.000000] Initializing cgroup subsys cpuacct | |
[ 0.000000] Linux version 3.17.0-rc5-00238-gfb115dd (xobs@xobs-novena-laptop) (gcc version 4.9.1 (Debian 4.9.1-19) ) #350 SMP PREEMPT Fri Dec 12 18:08:43 SGT 2014 | |
[ 0.000000] CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr=10c5387d | |
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache | |
[ 0.000000] Machine model: Kosagi Novena Dual/Quad | |
[ 0.000000] Ignoring memory range 0xffffffff - 0x100000000 | |
[ 0.000000] cma: Reserved 256 MiB at 2f800000 |
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
-- Chisel description | |
description = "counts how many times the specified system call has been called for every process" | |
short_description = "syscall count" | |
category = "misc" | |
args = {} | |
-- Initialization callback | |
function on_init() | |
-- Request the fileds that we need |
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
identifiers = ["IP Address", "Vlan", "Subnet Mask"] # etc. Define what you want to grab here | |
def parse_line(line): | |
# the second argument means only take the first split. e.g. "a:b:c" becomes "a", "b:c" | |
key, value = line.split(":", 1) | |
# if the identifier is one we care about | |
if key in identifiers: | |
return key, value | |
return None, None |
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/bind/db.salt.example.com: | |
file.managed: | |
- source: salt://templates/db.salt.example.com.pyt | |
- template: jinja | |
- user: root | |
- group: bind | |
- mode: 644 | |
bind_reload: | |
service.running: |
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
diff --git a/home/abraithwaite/.virtualenvs/gitfat/bin/git-fat b/home/abraithwaite/git-fat | |
index d459746..7838567 100755 | |
--- a/home/abraithwaite/.virtualenvs/gitfat/bin/git-fat | |
+++ b/home/abraithwaite/git-fat | |
@@ -619,10 +619,9 @@ class GitFat(object): | |
# Add lines to the .gitattributes file | |
new_ga = old_ga + ['{0} filter=fat -text'.format(f) for f in newfiles] | |
stdout, _ = ga_hashobj.communicate('\n'.join(new_ga) + '\n') | |
- self._update_index(ga_mode, stdout.strip(), ga_stno, '.gitattributes') | |
return ga_mode, stdout.strip(), ga_stno, '.gitattributes' |