Skip to content

Instantly share code, notes, and snippets.

View garrettwilkin's full-sized avatar

Garrett Wilkin garrettwilkin

View GitHub Profile
@garrettwilkin
garrettwilkin / Screen cheat sheet
Created October 18, 2013 17:24
Up my screen skills.
screen -S give_the_session_a_name #starts a new session
screen -list #list session
screen -r session_name_pid_thinger # reattach
@garrettwilkin
garrettwilkin / Git workflow
Created October 18, 2013 01:26
Git steps from Raymond.
Not pushing branch
==================
1. git branch feature_name
2. git checkout feature_name
3. vim awesome_file && make awesome_changes
4. git commit --verbose awesome_file
5. git show (review changes briefly)
6. git checkout master
7. git rebase feature_name
8. git pull --rebase origin master
@garrettwilkin
garrettwilkin / Terminal
Created October 16, 2013 19:25
Gollum is hiding, even after installing and adding gem directories to my $PATH. This is mac OSX.
$ which gollum
» ~/Code/Parsely/web.wiki (web+wiki) [master]
$ gem which gollum
/usr/local/Cellar/ruby/2.0.0-p247/lib/ruby/gems/2.0.0/gems/gollum-2.5.1/lib/gollum.rb
» ~/Code/Parsely/web.wiki (web+wiki) [master]
$ echo $PATH
/usr/local/bin:/usr/local/bin:/Users/gw/.virtualenvs/web+wiki/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/sbin::/usr/local/sbin:/Users/gw/.gem/ruby/1.8::/usr/local/sbin:/Users/gw/.gem/ruby/1.8:/Users/gw/.gem/ruby/2.0.0::/usr/local/sbin:/Users/gw/.gem/ruby/1.8:/Users/gw/.gem/ruby/2.0.0:/usr/local/Cellar/ruby/2.0.0-p247/lib/ruby/gems/2.0.0/
» ~/Code/Parsely/web.wiki (web+wiki) [master]
$ ruby -v
ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin12.5.0]
@garrettwilkin
garrettwilkin / terminal output
Created October 5, 2013 15:56
Mac OSX non comprende. Seems like there is no version output option?
airy:rapid-web gw$ easy_install --version
usage: easy_install [options] requirement_or_url ...
or: easy_install --help
error: option --version not recognized
@garrettwilkin
garrettwilkin / virtualenv warning
Created October 4, 2013 19:51
Attempted installing virtualenv. I already have conda install from installing that giant Anaconda package.
gw@airy ~> pip --version
pip 1.4.1 from /Users/gw/anaconda/lib/python2.7/site-packages (python 2.7)
gw@airy ~> sudo pip install virtualenv
Password:
WARNING: using virtualenv with Anaconda is untested and not recommended.
We suggest using the conda command to create environments instead.
For more information about creating conda environments, please see:
http://docs.continuum.io/conda/examples/create.html
airy:PyCodez gw$ pip
Traceback (most recent call last):
File "/usr/local/bin/pip", line 5, in <module>
from pkg_resources import load_entry_point
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2603, in <module>
working_set.require(__requires__)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 666, in require
needed = self.resolve(parse_requirements(requirements))
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 565, in resolve
raise DistributionNotFound(req) # XXX put more info here
server {
listen 80;
server_name *.hacktivate.org;
root /var/www/hacktivate;
}
server {
listen 80;
server_name openvehicletracker.org;
rewrite ^ http://mainehackerclub.github.io/open_vehicle_tracker permanent;
this._commsAjax("pagedQuery",
data,
$.proxy(function(data) {
if (data.errorCode != 0) {
delete this._activeSess[sessionId];
queryObj.error(data.errorText, data.errorCode);
}
}, this)
@garrettwilkin
garrettwilkin / HTML
Last active December 14, 2015 20:48
Wordpress header CSS styling
<div id="page" class="hfeed site">
<header id="masthead" class="site-header" role="banner">
<nav role="navigation" class="site-navigation main-navigation">
<h1 class="assistive-text">Menu</h1>
<div class="assistive-text skip-link"><a href="#content" title="Skip to content">Skip to content</a></div>
<div class="menu"><ul><li class="current_page_item"><a href="http://mainecivichackday.com/" title="Home">Home</a></li><li class="page_item page-item-1"><a href="http://mainecivichackday.com/about/">About</a></li><li class="page_item page-item-20"><a href="http://mainecivichackday.com/participate/">Participate</a></li><li class="page_item page-item-24"><a href="http://mainecivichackday.com/solve/">Solve</a></li><li class="page_item page-item-9"><a href="http://mainecivichackday.com/contact/">Contact</a></li></ul></div>
</nav><!-- .site-navigation .main-navigation -->
<hgroup>
<h1 class="site-title"><a href="http://mainecivichackday.com/" title="Maine Civic Hack Day" rel="home">Maine Civic Hack
@garrettwilkin
garrettwilkin / build.xml
Created December 12, 2012 21:44
Trying to create a source jar for use with Netbeans, so that it can intellisense me to the implementation of various functions. I've tried to add sources so many ways, and failed everytime. I thought that this jar of java files would do the trick. I was wrong. Check out the source-jar target.
<project name="comFidessaUstpPairsDialogUtil" default="main" basedir=".">
<property environment="env"/>
<property name="srcDir" value="${basedir}/src"/>
<property name="bldDir" value="${basedir}/build"/>
<property name="jarDir" value="${env.CASE}/regional/classes"/>
<path id="case.jar">
<pathelement path="${classpath}"/>