Skip to content

Instantly share code, notes, and snippets.

View actaneon's full-sized avatar

Josh King actaneon

  • Get Satisfaction
  • San Francisco, CA
View GitHub Profile
@actaneon
actaneon / tmux
Created July 31, 2014 21:48
Tmux
tmux list-sessions
tmux attach-session [ -t foo ]
tmux new-session -s oneup_postgres
Detach: <C-B> d
@actaneon
actaneon / ResqueClear
Last active August 29, 2015 14:03
Resque Clear All Queues
# redis-cli KEYS "resque:*" | xargs redis-cli DEL
Resque.queues.each { |q| Resque.redis.del "queue:#{q}" }
@actaneon
actaneon / Kernel#caller
Created October 28, 2013 22:20
Get Backtrace
Kernel.caller
@actaneon
actaneon / Resque Reset Delayed Queue
Created October 28, 2013 22:09
Resque Reset Delayed Queue
> Resque.reset_delayed_queue
Install
-----------------
brew install postgresql
initdb /usr/local/var/postgres
Startup
-----------------
# Required if using Launctl
If this is your first install, automatically load on login with:
@actaneon
actaneon / AwkExamples.txt
Created September 14, 2010 03:39
Awk Examples
ps -Af | awk '{print $3,$8}'
python -c "import SimpleHTTPServer;SimpleHTTPServer.test()"
@actaneon
actaneon / VimCommands.txt
Created April 14, 2010 17:15
Vim Commands
Moved to README within Vim Environment repo
http://github.com/actaneon/VimEnv/blob/master/README
@actaneon
actaneon / Git.txt
Created March 24, 2010 05:42
Git Commands
list untracked, unignored files: git ls-files -o --exclude-standard
unstage: git reset HEAD FILE
unstage and undo local: git reset --hard HEAD FILE
undo unstaged file: git checkout -- FILE
undo commit with using new commit: git revert [HEAD|$id]
update last commit to include missed adds: git commit --amend (after git add FILE)
git push origin :branch #remove remote
git remote prune origin
@actaneon
actaneon / CompositionAndOCP.cs
Created March 2, 2010 18:54
Composition and IoC for OCP Adherence
//Using Composition and IoC to add a logging to the IService implementation without violating OCP.
//Instantiate with: For<IService>.Use<LoggingService>().Ctor<IService>().Is<SomeService>();
//
//create a LoggingService : IService that takes the *real* IService in it's c'tor
public class LoggingService : IService
{
private IService _realService;
private ILogger _log;
public LoggingService(IService realService, ILogger log)