Skip to content

Instantly share code, notes, and snippets.

View ddeyoung's full-sized avatar

Dustin DeYoung ddeyoung

  • Indianapolis, IN
View GitHub Profile
@ddeyoung
ddeyoung / remote_localhost_access.md
Created June 16, 2017 12:45
Remote web server access to localhost
@ddeyoung
ddeyoung / rename_files.txt
Created April 14, 2017 13:26
Rename all files in a folder on OS X
for old in ./file_*.svg;
do
new=$(echo $old | sed -e 's/file_//g');
mv -v "$old" "$new";
done
@ddeyoung
ddeyoung / generate_system_iops.txt
Created March 30, 2017 14:01
Generate IOPS on *nix
cat /dev/sda | /dev/null
@ddeyoung
ddeyoung / redis_benchmark.txt
Created December 13, 2016 15:05
Redis Benchmark Cmd
redis-benchmark -h x.x.x.x -p xxxx -r 20 -q -l
@ddeyoung
ddeyoung / gist:267ed08da8ef44ec9181
Created May 6, 2015 01:41
Regex find all non-ASCII (code point > 128) characters
[^\x00-\x7F]
#!/usr/bin/env ruby
# Usage:
# ksdiffdir.rb /path/to/a /path/to/b
FOLDER_A = ARGV[0]
FOLDER_B = ARGV[1]
def build_file_list(dir_path)
Dir.glob("#{dir_path}/**/*").select{ |f| File.file?(f) }.collect{ |f| f.gsub("#{dir_path}", '') }
@ddeyoung
ddeyoung / clean_releases.sh
Created November 20, 2013 20:00
Keep it clean.
KEEP_MAX=5
(ls -t|head -n $KEEP_MAX;ls)|sort|uniq -u|xargs rm -rf
@ddeyoung
ddeyoung / gist:7169861
Created October 26, 2013 14:07
Create Mavericks Bootable Installer
sudo /Applications/Install\ OS\ X\ Mavericks.app/Contents/Resources/createinstallmedia --volume Mac\ OS\ X\ Install\ ESD/ --applicationpath /Applications/Install\ OS\ X\ Mavericks.app --nointeractio
@ddeyoung
ddeyoung / gist:6529113
Created September 11, 2013 20:11
Disable grails events in tests.
Domain.metaClass.event = { arg1, arg2, arg3 ->}
@ddeyoung
ddeyoung / secret_input.rb
Last active December 17, 2015 13:48
Get command line input without displaying the input as it's entered.
require 'io/console'
STDIN.noecho(&:gets)