GGCode is a small Google Maps API Geocoder using the Google Maps API v3.
Usage is extremely easy:
- Add to your gemfile
gem 'ggcode', :git => 'https://gist.github.com/bulters/5133207'
| named_scope :magic, lambda { | |
| { | |
| :joins => "INNER JOIN airings ON airings.id=spotlights.object_id INNER JOIN episodes ON episodes.id=airings.episode_id", | |
| :conditions => ["object_type='Airing' AND airings.ends_at < ? AND episodes.video IS NOT NULL", DateTime.now.utc], | |
| :order => "airings.ends_at DESC", | |
| :group => "airings.id" | |
| } | |
| } |
| git config --global alias.unstage='reset HEAD --' |
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
| Version 2, December 2004 | |
| Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE> | |
| Everyone is permitted to copy and distribute verbatim or modified | |
| copies of this license document, and changing it is allowed as long | |
| as the name is changed. | |
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
GGCode is a small Google Maps API Geocoder using the Google Maps API v3.
Usage is extremely easy:
gem 'ggcode', :git => 'https://gist.github.com/bulters/5133207'
| def scaleAndRotateImage(image) | |
| scaleAndRotateImage(image, maxResolution: 640) | |
| end | |
| def scaleAndRotateImage(image, maxResolution: maxResolution) | |
| imgRef = image.CGImage | |
| width, height = CGImageGetWidth(imgRef), CGImageGetHeight(imgRef) | |
| bounds = CGRectMake(0, 0, width, height) | |
| if (width > maxResolution || height > maxResolution) |
| prooflink_url = "https://" + [ProoflinkConnect.config.subdomain, ProoflinkConnect.config.provider_endpoint].join(".") + "/api/accounts/sign_in" | |
| prooflink_params = { | |
| :api_key => ProoflinkConnect.config.api_key, | |
| :user => { | |
| :email => username, | |
| :password => password | |
| } | |
| } | |
| prooflink_auth = JSON.parse(RestClient.post(prooflink_url, prooflink_params).body) | |
| # token zit nu in prooflink_auth["token"] |
| #!/bin/bash | |
| for USER in `cat .fingers` | |
| do | |
| finger $USER | |
| echo "================================================================================" | |
| done |
| " utf-8 only | |
| scriptencoding utf-8 | |
| " no vi compat | |
| set nocompatible | |
| function! InstallVundle () | |
| let iCanHazVundle=1 | |
| let vundle_readme=expand('~/.vim/bundle/vundle/README.md') | |
| if !filereadable(vundle_readme) |
| class FBAuthenticator | |
| def initialize(uid, token) | |
| @uid = uid | |
| @token = token | |
| end | |
| def authenticate(args) | |
| raise ArgumentError unless args.has_key?(:success) | |
| raise ArgumentError unless args.has_key?(:fail) |
I hereby claim:
To claim this, I am signing this object: