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
go fmt | |
warnings=`golint` | |
if [[ $warnings != "" ]]; then | |
echo $warnings | |
exit 1 | |
fi | |
exit 0 |
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" | |
func main() { | |
s := "Let's hack together!" | |
fmt.Printf("%# x\n", s) | |
fmt.Println([]byte(s)) | |
} |
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" | |
) | |
func insertionSort(a []int, asc bool) { | |
for i := 1; i < len(a); i++ { | |
for j := i; j > 0; j-- { | |
switch asc { |
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" | |
) | |
func xorSwap(x, y *int) { | |
if x != y { | |
*x ^= *y; | |
*y ^= *x; |
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
angular.module('file.upload', []) | |
.factory('fileSvc', ['$http', '$q', function ($http, $q) { | |
'use strict'; | |
var factory = {}; | |
factory.readFile = function (file) { | |
return $q(function (resolve, reject) { | |
if (!file) | |
reject('file= ' + file); |
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/bash | |
env ARCHFLAGS="-arch x86_64" LDFLAGS="-L/usr/local/opt/openssl/lib" CFLAGS="-I/usr/local/opt/openssl/include" pip install requests[security] urllib3 |
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
[Service] | |
ExecStart= | |
ExecStart=/usr/bin/docker daemon -H fd:// --bip=172.17.42.1/16 |
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
launchctl list | sed -E "s/(.*com.apple.*)//g" | sed '/^\s*$/d' |
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/bash | |
echo "OS X update" | |
softwareupdate -ia | |
echo "Brew update" | |
brew update && brew upgrade --all && brew cleanup | |
#echo "pip2 update" | |
#pip2 list -o > pip.txt |
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
brew install libvpx ffmpeg --with-libvpx --with-libfaac --with-fdk-aac | |
Raspbian Jessie: | |
./configure --enable-libfreetype --enable-gpl --enable-nonfree --enable-libx264 --enable-libass --enable-libmp3lame --enable-zlib --enable-postproc --enable-pthreads |