Get it from the App Store.
In XCode's Preferences > Downloads you can install command line tools.
module Authenticable | |
extend ActiveSupport::Concern | |
included do | |
key :username, String | |
key :email, String | |
key :crypted_password, String | |
key :password_salt, String | |
key :persistence_token, String | |
key :login_count, Integer, :default => 0 |
class Commentable | |
include MongoMapper::Document | |
many :comments, :as => :commentable | |
end | |
class Article < Commentable | |
end | |
class Product < Commentable | |
end |
// via @DmitryBaranovsk | |
function dirtyCommas(num) { | |
return String(num).replace(/^\d+(?=\.|$)/, function (int) { return int.replace(/(?=(?:\d{3})+$)(?!^)/g, ","); }); | |
} |
app.get('/proxied_image/:image_url', function(request_from_client, response_to_client){ | |
sys.puts("Starting proxy"); | |
var image_url = request_from_client.params.image_url; | |
var image_host_name = url.parse(image_url).hostname | |
var filename = url.parse(image_url).pathname.split("/").pop() | |
var http_client = http.createClient(80, image_host_name); | |
var image_get_request = http_client.request('GET', image_url, {"host": image_host_name}); | |
image_get_request.addListener('response', function(proxy_response){ |
Titanium.UI.setBackgroundColor('red'); | |
// root | |
var rootWin = Ti.UI.createWindow({ | |
title: 'Root Win', | |
backgroundColor: 'gray', | |
tabBarHidden: true, | |
navBarHidden: true | |
}); |
/* | |
* L.TileLayer is used for standard xyz-numbered tile layers. | |
*/ | |
L.Google = L.Class.extend({ | |
includes: L.Mixin.Events, | |
options: { | |
minZoom: 0, | |
maxZoom: 18, | |
tileSize: 256, |
#!/bin/sh | |
# | |
# This hook is placed in Bare repository and it updates Working tree whenever a PUSH | |
# is executed | |
# | |
# Assuming following file structure: | |
# . | |
# |-- myproject | |
# |-- myproject.git | |
# set WORKTREE=../myproject |
Update: please note that I have since switched to using a set of bash scripts instead of poluting the Git repository with git svn
.
Author: Kaspars Dambis
kaspars.net / @konstruktors
#!/bin/bash | |
DATADIR=/dev/shm/mysql | |
TMPDIR=/dev/shm/mysql_tmp | |
MYSQL_SOCKET=/dev/shm/mysql.sock | |
pkill -9 -f mysql.*datadir.*$DATADIR | |
mkdir -p $DATADIR |