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
INSERT INTO "users" ("name", "single_access_token", "created_at", "perishable_token", "updated_at", "installed_at", "uid", "timezone", "persistence_token", "last_name", "birthday", "last_login_at", "email", "first_name", "middle_name", "access_token") VALUES(E'Portail Serialsfactory', E'aZ7UMhB7mDNTnjmY57n', '2010-10-15 05:18:44.419536', E'yKeOeTvYPHvPODxg8nh', '2010-10-15 05:18:44.419536', NULL, 100000349053153, NULL, E'f0ca0751e228777ec5784759f3492845472b0476a6da3b73b51bb713a0fb68b8b077c22f7dab8c50364945e5c3b65d8382899f12b9273cf7076a4f98ebc5cc7f', E'Serialsfactory', NULL, NULL, NULL, E'Portail', NULL, NULL) RETURNING "uid" |
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
function parse_git_branch { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' | |
} | |
function proml { | |
local BLUE="\[\033[0;34m\]" | |
local RED="\[\033[0;31m\]" | |
local LIGHT_RED="\[\033[1;31m\]" | |
local GREEN="\[\033[0;32m\]" | |
local LIGHT_GREEN="\[\033[1;32m\]" |
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
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { | |
static NSString *IngredientsCellIdentifier = @"IngredientsCell"; | |
EditingTableViewCell *cell = (EditingTableViewCell *)[tableView dequeueReusableCellWithIdentifier:IngredientsCellIdentifier]; | |
if (cell == nil) { | |
[[NSBundle mainBundle] loadNibNamed:@"EditingTableViewCell" owner:self options:nil]; | |
cell = editingTableViewCell; | |
self.editingTableViewCell = nil; | |
} |
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
# http://stackoverflow.com/questions/2674392/how-to-access-google-maps-api-v3-markers-div-and-its-pixel-position/2692617#2692617 | |
scale = Math.pow 2, @map.getZoom() | |
nw = new google.maps.LatLng @map.getBounds().getNorthEast().lat(), @map.getBounds().getSouthWest().lng() | |
worldCoordinateNW = @map.getProjection().fromLatLngToPoint nw | |
worldCoordinate = @map.getProjection().fromLatLngToPoint venueMarker.getPosition() | |
pixelOffset = new google.maps.Point Math.floor((worldCoordinate.x - worldCoordinateNW.x) * scale), Math.floor((worldCoordinate.y - worldCoordinateNW.y) * scale) | |
tooltipDiv = $('#explore-tooltip') | |
tooltip = width: tooltipDiv.width(), height: tooltipDiv.height() |
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
scale = Math.pow(2, this.map.getZoom()); | |
nw = new google.maps.LatLng(this.map.getBounds().getNorthEast().lat(), this.map.getBounds().getSouthWest().lng()); | |
worldCoordinateNW = this.map.getProjection().fromLatLngToPoint(nw); | |
worldCoordinate = this.map.getProjection().fromLatLngToPoint(venueMarker.getPosition()); | |
pixelOffset = new google.maps.Point(Math.floor((worldCoordinate.x - worldCoordinateNW.x) * scale), Math.floor((worldCoordinate.y - worldCoordinateNW.y) * scale)); | |
tooltipDiv = $('#explore-tooltip'); | |
tooltip = { | |
width: tooltipDiv.width(), | |
height: tooltipDiv.height() | |
}; |
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
<div style="display: none !important;">a cool preview of your email</div> |
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
def emoji | |
["E449".to_i(16)].pack("U") | |
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
# make a new app with foursquare inside | |
run "rm public/index.html" | |
if yes?('do you want to register a new app on Foursquare?') | |
app_name = "generator-app-" + rand(10000).to_s | |
puts "your app's name: #{app_name}" | |
puts "create a new app from: https://foursquare.com/developers/register" | |
puts "Download / welcome page url: http://#{app_name}.herokuapp.com" | |
puts "Callback url: http://#{app_name}.herokuapp.com/clients/foursquare/callback" | |
puts "Push url: https://#{app_name}.herokuapp.com/checkins" |
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
# make a new app with foursquare inside | |
run "rm public/index.html" | |
require 'rubygems' | |
require 'active_support' | |
# gem('launchy') | |
# require 'launchy' | |
app_name = File.basename(Dir.getwd).to_s.parameterize |
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
// Twitter Issue (Can't tweet exclamation mark with v1.1) | |
// https://dev.twitter.com/discussions/12378 | |
// https://github.com/mikeal/request/issues/578 | |
var escape = function(str) { | |
return encodeURIComponent(str).replace(/[!*()']/g, function(character) { | |
return '%' + character.charCodeAt(0).toString(16); | |
}); | |
}; |