Skip to content

Instantly share code, notes, and snippets.

View RyanMcG's full-sized avatar
👣
standing

Ryan McGowan RyanMcG

👣
standing
View GitHub Profile
@RyanMcG
RyanMcG / rails-pre-commit
Last active August 1, 2018 17:05
A pre-commit hook for rails projects that scans for 'binding.pry', 'debugger' and diff artifacts and stops the commit if it finds any.
#!/bin/sh
COMMAND='git grep -n --cached'
ARGS='-e debugger -e "binding\.pry" -- app config db spec vendor script lib Rakefile Guardfile Capfile'
if eval "$COMMAND -q $ARGS" ; then
echo "You have a binding.pry or a debugger in a bad place.\n"
eval "$COMMAND $ARGS"
exit 1
fi
@return1
return1 / bitcoin-cpuminer.sh
Last active July 8, 2024 19:21
install a bitcoin cpuminer on ubuntu/debian
# install dependencies
sudo apt-get install libcurl4-openssl-dev libncurses5-dev pkg-config automake yasm
# clone cpuminer
git clone https://github.com/pooler/cpuminer.git
# compile
cd cpuminer
./autogen.sh
./configure CFLAGS="-O3"
@sschuberth
sschuberth / adb_kill.py
Created July 25, 2012 10:04 — forked from marshall/adb_kill.py
kill a running android process without eclipse
#!/usr/bin/python -O
# Kill a running Android JDWP (debuggable) process without Eclipse.
import sys
import socket
import struct
import uuid
import random
import subprocess