Skip to content

Instantly share code, notes, and snippets.

View petros's full-sized avatar
👾
Making games

Petros Amoiridis petros

👾
Making games
View GitHub Profile
@petros
petros / gist:2063527
Created March 17, 2012 17:56
Nice git aware bash prompt

Here is a nice addition to your .bash_profile, so as to have a cool git aware prompt:

export CLICOLOR=1
export LSCOLORS=gxBxhxDxfxhxhxhxhxcxcx
source ~/.git-completion.sh
PS1='\[\033[34m\]\W\[\033[0m\]$(__git_ps1 " (\[\033[35m\]%s\[\033[0m\])") \$ '
GIT_PS1_SHOWDIRTYSTATE=1
GIT_PS1_SHOWSTASHSTATE=1
GIT_PS1_SHOWUNTRACKEDFILES=1
@petros
petros / gist:1208330
Created September 10, 2011 13:49 — forked from apod/gist:1208284
Resize application
tell application (path to frontmost application as Unicode text)
activate
set x to 400
set y to 400
set width to 1024
set height to 768
set bounds of window 1 to {x, y, x + width, y + height}
end tell
@petros
petros / ISeeA Space.txt
Created September 4, 2011 17:59
Gist with space in it
Test
@petros
petros / foo.py
Created June 24, 2011 23:16
Test!
def foo():\n return 1
This is just a test.
@petros
petros / add_untrusted_cert.sh
Created May 5, 2011 15:33
creating java keystore
mcl@correspondence:~/Desktop$ java InstallCert abc.host.pl keystore_pass
Loading KeyStore keystore.jks...
Opening connection to abc.host.pl:443...
Starting SSL handshake...
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:174)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1623)
at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:198)
at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:192)

Lorem ipsum

Dolor Sit
Amet Consecteteuer
Adipisicing Elit
@petros
petros / CampfireIcons.txt
Created January 25, 2011 23:36
Campfire icons
:sunny:
:zap:
:leaves:
:lipstick:
:cop:
:wheelchair:
:fish:
:hammer:
:moneybag:
:calling:
@petros
petros / GitWorkflow.md
Created December 27, 2010 16:42
Git workflow

We all push and pull from master branch. Code changes should only be pushed to github if all tests are green.

Below is a common workflow for a team working with a central repo. several variations are possible, but if unsure, please go by this:

  1. if you are working from a Pivotal Tracker story, click "start" on that story
  2. git pull
  3. rake db:migrate
  4. rake db:test:prepare
  5. spec spec
  6. cucumber (if we are using it)
@petros
petros / application.js
Created December 22, 2010 22:03
Part of application.js
//update rooms/price
for ( i=1; i<=info.rooms; i++){
roomsHTML += '<option value="' + i + '">' + i + ( (i==1)?' Room':' Rooms' ) + '</option>';
}
$('#reservation-system select.rooms-quantity', $content).html(roomsHTML);