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
# | |
# Reference makefile for a go project setup to be | |
# a standalone directory that builds a couple of utilities | |
# from a external library referenced by cgo | |
# | |
.PHONY: tgt1bin tgt2bin clean links | |
# dir structure | |
# rootproj/ | |
# tgt1/tgt1main.go (tgt binary referencing pkgname) |
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
#!/bin/bash | |
# Author: Khaja Minhajuddin (A.Chen modified...) | |
# Wait for go files to be modified and then execute them | |
# Dependency: inotify-tools | |
# Install on ubuntu using: apt-get install inotify-tools | |
wdir=$1 | |
if [ -z $wdir ]; then | |
wdir=`pwd` |
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
/* | |
main.go | |
*/ | |
package main | |
import ( | |
"fmt" | |
"sync" | |
"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
Show hidden characters
{ | |
"cmd": ["go build"], | |
"selector": "source.go", | |
"path": "/usr/local/go/bin", | |
"working_dir": "${file_path}", | |
"shell": true, | |
"file_regex": "^([^:\n]+):([0-9]+)", | |
"variants": [ |
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
#!/bin/sh | |
# Print errno codes in columns | |
# second ans. underneath was useful here... | |
# http://stackoverflow.com/questions/503878/how-to-know-what-the-errno-means | |
# pr makes the text list into columns | |
scrwid=`tput cols` |
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
# | |
# callable by my 'clu' alias clu='make -f Makefile.clu' | |
# | |
default : list_targets | |
list_targets : | |
@echo Targets | |
@echo |
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 ruby | |
arg_file = ARGV[0] | |
fbase = File.basename( File.split(arg_file)[1], ".gv") | |
outfile = fbase + ".png" | |
cmd = "dot -Tpng #{arg_file} > #{outfile}" | |
# puts cmd |
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
#!/bin/bash | |
# quick script frontend for apt & dpkg | |
cmd=$1 | |
shift | |
case $cmd in | |
search|sea) | |
apt-cache search $* | |
;; | |
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
ff() { | |
case $# in | |
1) | |
find . -name "*$1*" | |
;; | |
2) | |
find $1 -name "*$2*" | |
;; | |
*) | |
echo ff - find file name |