Skip to content

Instantly share code, notes, and snippets.

View Dangeranger's full-sized avatar
🦊
🍵 🐕 🚴

Joshua Burke Dangeranger

🦊
🍵 🐕 🚴
View GitHub Profile
@Dangeranger
Dangeranger / orgmode_cheat_sheet.txt
Created September 13, 2016 13:08
OrgMode Cheat Sheet
From http://orgmode.org/orgcard.txt on 2016-09-13
================================================================================
Org-Mode Reference Card (for version 7.8.11)
================================================================================
================================================================================
Getting Started
@Dangeranger
Dangeranger / pair_programmer_automation.md
Last active July 27, 2016 13:09
Description of how to make lonely pair programming work, maybe ...

Problem

  1. I am much more productive and performant when I program with another person while working through a problem.
  2. Other people are not usually around or available to program together on an issue.
  3. Programming along

Simple Solution

Rubber-Duck

  1. Buy a rubber duck
@Dangeranger
Dangeranger / fix_borked_docker_machine.sh
Created February 3, 2016 21:28
fix borked docker machine
$ docker-machine ssh dev
Boot2Docker version 1.9.0, build master : 16e4a2a - Tue Nov 3 19:49:22 UTC 2015
Docker version 1.9.0, build 76d6bc9
$ sudo -i
$ rm -rf /var/lib/docker/network
# exit from the Docker host and then run

Keybase proof

I hereby claim:

  • I am dangeranger on github.
  • I am dangeranger (https://keybase.io/dangeranger) on keybase.
  • I have a public key whose fingerprint is F7F0 EC17 803F 29AE C576 C97B DED8 CBDB A8A9 B4A9

To claim this, I am signing this object:

@Dangeranger
Dangeranger / coding-practice-resources.md
Created June 19, 2015 19:42
Coding Practice Resources
Simple List of Websites
  • Project Euler - The #1 goto site for coding practice on the internet, IMO.
  • Rosetta Code - Unlike most other sites on this list, Rosetta Code is not a contest site. There are problems listed, and so are the solutions, in a plethora of different languages. You can go check out the problems, solve them, check out other solutions. It's goal is to solve problems in as many languages as possible.
  • Code Chef - Holds monthly programming contests
  • UVa Online Judge - Contains hundreds of problems, which can be downloaded too
  • Coderbyte
    • Another coding competition site
  • The Python Challenge - A pretty cool & very difficult challenge. Makes you think, a lot, and not just for coding.
  • Code Golf Stack Exchange - A programming challenge with a twist - The code has to be the smallest.
  • Anarchy Golf - Another place to golf
@Dangeranger
Dangeranger / active_record_hstore_queries.md
Created June 3, 2015 20:44
ActiveRecord Hstore Querys

###Querying the database

Now you just need to learn a little bit of new sqls for selecting stuff (creating and updating is transparent). Find records that contains a key named 'foo’:

Person.where("data ? 'foo'")

Git Cheat Sheet

Although there are enough resources on the web about Git, I will keep this one for my own reference. Minimal Git version required 1.7.2.

TOC

@Dangeranger
Dangeranger / shell_scripting_primer.md
Last active August 29, 2015 14:21
Shell Scripting Primer OSX

###Core Commands

Command Description
cd Go to Home directory
cd ~ Go to Home directory
cd [folder] Go to a [folder]
cd / Go to Root of the operating system
ls List files and sub-directories in the directory
ls -l List details of files and sub-directories in the directory
@Dangeranger
Dangeranger / useful-git-commands.md
Last active August 29, 2015 14:21
Useful Git Commands

###Checkout a remote branch and set it to track the remote

This will keep your local branch in sync with the remote on push/pull/fetch

[email protected]:~$ git branch -vv

  joshes_branch   6a1e534 [origin/joshes_branch] added script tags to index.html
@Dangeranger
Dangeranger / database_backup_restore_simple.rake
Last active August 29, 2015 14:15
Simpe Rails database backup and restore Rake tasks
# lib/tasks/db.rake
namespace :db do
desc "Dumps the database to db/APP_NAME.dump"
task :dump => :environment do
cmd = nil
with_config do |app, host, db, user|
cmd = "pg_dump --host #{host} --username #{user} --verbose --clean --no-owner --no-acl --format=c #{db} > #{Rails.root}/db/#{app}.dump"
end
puts cmd