This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /*Selects all contracts, which aren't billed yet*/ | |
| SET @start_date = '2010-06-01', @end_date = '2010-06-30'; | |
| SET @month = MONTH(CURDATE()), @year = YEAR(CURDATE()); | |
| SELECT c.id, c.start_date, c.end_date, IF(tmp.id IS NULL, 'Billable', 'Not Billable') | |
| FROM contracts c | |
| LEFT JOIN ( | |
| SELECT r.id, r.contract_id | |
| FROM receivables r LEFT JOIN billing_cycles b ON r.billing_cycle_id = b.id | |
| WHERE b.month = @month AND b.year = @year |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #-- | |
| # | |
| # Utility for creating Google Maps Encoded GPolylines | |
| # | |
| # License: You may distribute this code under the same terms as Ruby itself | |
| # | |
| # Author: Joel Rosenberg | |
| # | |
| # ( Drawing from the official example pages as well as Mark McClure's work ) | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| rake | |
| rdoc | |
| mysql | |
| haml | |
| warden | |
| formtastic | |
| validation_reflection | |
| devise -v=1.0.8 | |
| inherited_resources -v=1.0.6 | |
| rails -v=2.3.8 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| c_cyan=`tput setaf 6` | |
| c_red=`tput setaf 1` | |
| c_green=`tput setaf 2` | |
| c_sgr0=`tput sgr0` | |
| parse_git_branch () | |
| { | |
| if git rev-parse --git-dir >/dev/null 2>&1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [["1007", "FRA", "Paris"], | |
| ["599", "ITA", "Rome"], | |
| ["556", "DEU", "Berlin"], | |
| ["493", "CHN", "Beijing"], | |
| ["476", "GBR", "London"], | |
| ["468", "CZE", "Prague"], | |
| ["464", "CHN", "Shanghai"], | |
| ["376", "TUR", "Istanbul"], | |
| ["311", "USA", "Houston"], | |
| ["301", "ESP", "Barcelona"], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #geocoding | |
| http://where.yahooapis.com/geocode?location=#{lat}+#{lng}&select=long&gflags=R&flags=JG&locale=de_DE&appid=yriO3VLV34FFnugEQiyGOPxdYv34qVysSj18QREiX5OCucPPM4fv9Kxk1H3yp2SJ | |
| #place | |
| http://where.yahooapis.com/v1/place/#{woeid}?select=long&format=json&lang=de-DE&appid=yriO3VLV34FFnugEQiyGOPxdYv34qVysSj18QREiX5OCucPPM4fv9Kxk1H3yp2SJ | |
| #ancestors of place | |
| http://where.yahooapis.com/v1/place/#{woeid}/ancestors?select=long&format=json&lang=de-DE&appid=yriO3VLV34FFnugEQiyGOPxdYv34qVysSj18QREiX5OCucPPM4fv9Kxk1H3yp2SJ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| begin | |
| require 'tokyocabinet' | |
| rescue LoadError | |
| puts "You need the tokyocabinet gem" | |
| exit | |
| end | |
| require 'md5' | |
| require 'net/http' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #curl -e http://www.spiegel.de 'http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q=Apfelkernöl' | |
| { | |
| "responseData": { | |
| "results": [ | |
| { | |
| "GsearchResultClass": "GwebSearch", | |
| "unescapedUrl": "http://www.mymovies.it/dizionario/recensione.asp?id\u003d17044", | |
| "url": "http://www.mymovies.it/dizionario/recensione.asp%3Fid%3D17044", | |
| "visibleUrl": "www.mymovies.it", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'rubygems' | |
| require 'popen4' #http://popen4.rubyforge.org/ | |
| IO.popen("wall", "w") do |io| | |
| io.write "hello from ruby" | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module AWS | |
| module S3 | |
| class Authentication | |
| class CanonicalString | |
| def initialize(request, options = {}) | |
| super() | |
| @request = request | |
| @headers = {} | |
| @options = options | |
| # "For non-authenticated or anonymous requests. A NotImplemented error result code will be returned if |