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 | |
# if $0 looks like id@domain | |
# then login as id | |
# else | |
# login as default user | |
__DEFAULT_SSH_LOGIN_UID__="root" | |
__self__="`basename $0`" | |
__tmp__="`mktemp -t uid`" |
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 -eux | |
ARCH=${ARCH:-x86_64} | |
CORES=$(sysctl -n hw.ncpu) | |
GHC=${GHC:-7.4.2} | |
CABAL=${CABAL:-0.14.0} | |
PLATFORM=${PLATFORM:-2012.2.0.0} | |
[[ ! -d /usr/local/src ]] && mkdir -p /usr/local/src |
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
# | |
# Wide-open CORS config for nginx | |
# | |
location / { | |
if ($request_method = 'OPTIONS') { | |
add_header 'Access-Control-Allow-Origin' '*'; | |
# |
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 | |
# A.J <[email protected]> | |
# 2013-12-27 | |
# v0.0.6 | |
# | |
# set cpu limit to Flash player! | |
# default limit value: 30% | |
# usage: | |
# set-cpu-limit-to-flash-player.sh 50 | |
# |
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 | |
# A.J <[email protected]> | |
# 2013-12-27 | |
# v0.0.2 | |
# | |
# set cpu limit on pattern matched processes | |
# default limit value: 10% | |
# usage: | |
# climit.to <['process-name' | 'kill-all']> [value-to-limit-in-percentage]" | |
# |
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
Show hidden characters
{ | |
"shell_cmd": "cd ../sim/ && make clean && make && ./PebbleSim", | |
"file_regex": "^../src/(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$" | |
} |
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
#include <string.h> | |
#include <ctype.h> | |
#include <SoftwareSerial.h> | |
// the Bluetooth Shield connects to Pin D9 & D10 | |
SoftwareSerial bt(9,10); | |
const uint8_t req[5] = {0x00, 0x01, 0x00, 0x11, 0x00}; | |
const uint8_t cap[17] = {0x00, 0x0d, 0x00, 0x11, 0x01, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32}; | |
const uint8_t ping[9] = {0x00, 0x05, 0x07, 0xd1, 0x00, 0xde, 0xad, 0xbe, 0xef}; |
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
// Traverses an arbitrary struct and translates all stings it encounters | |
// | |
// I haven't seen an example for reflection traversing an arbitrary struct, so | |
// I want to share this with you. If you encounter any bugs or want to see | |
// another example please comment. | |
// | |
// The MIT License (MIT) | |
// | |
// Copyright (c) 2014 Heye Vöcking | |
// |
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 | |
# if $0 looks like id@domain | |
# then login as id | |
# else | |
# login as default user | |
default_uid="root" | |
script="`basename $0`" |
OlderNewer