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
sudo apt-get install zlib1g-dev libssl-dev libreadline5-dev libxml2-dev libsqlite3-dev
@petros
petros / new.html.erb
Created December 21, 2010 11:28
Credit card fields (Formtastic)
<% f.inputs :name => "Payment" do %>
<%= f.input :first_name %>
<%= f.input :last_name %>
<%= f.input :card_type, :label => :card_type, :collection => [["Visa", "visa"], ["MasterCard", "master"], ["Discover", "discover"], ["American Express", "american_express"]] %>
<%= f.input :card_number %>
<%= f.input :card_verification, :label => 'Card Verification Value (CVV)' %>
<%= f.input :card_expires_on, :discard_day => true, :start_year => Date.today.year, :end_year => (Date.today.year+10), :add_month_numbers => true %>
<% end %>
@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);
@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 / CampfireIcons.txt
Created January 25, 2011 23:36
Campfire icons
:sunny:
:zap:
:leaves:
:lipstick:
:cop:
:wheelchair:
:fish:
:hammer:
:moneybag:
:calling:

Lorem ipsum

Dolor Sit
Amet Consecteteuer
Adipisicing Elit
@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)
This is just a test.
@petros
petros / foo.py
Created June 24, 2011 23:16
Test!
def foo():\n return 1
@petros
petros / ISeeA Space.txt
Created September 4, 2011 17:59
Gist with space in it
Test