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
// https://gist.github.com/jormon/d8bfa406f3a2eadbab079f2b0e59e3c7 | |
$(document).ready(function() { | |
var clearSelect = function(select) { | |
var children = select.first().children() | |
if(children.length == 0) { return; } | |
for (i = 0; i < children.length; i++) { | |
children[i].remove(); | |
} | |
text = "Select a store..." | |
var placeholder = $("<option value='' disabled selected>"+text+"</option>"); |
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
Jan 27 19:39:29 spaziale itunesstored[108] <Warning>: [ApplicationWorkspace]: Installing software package with bundleID: com.placemarker.places: bundleVersion: 3 path: /var/mobile/Media/Downloads/-5310997826876130007/1030928563015335669 | |
Jan 27 19:39:29 spaziale itunesstored[108] <Warning>: LaunchServices: installing app for existing placeholder <LSApplicationProxy: 0x1266a69d0> com.placemarker.places (Placeholder) <file:///private/var/mobile/Containers/Bundle/Application/81C017B2-D164-4083-9A4A-010C3CE0EF39/-5310997826876130007.app> | |
Jan 27 19:39:29 spaziale itunesstored[108] <Warning>: LaunchServices: Creating installProgressForApplication:<LSApplicationProxy: 0x1266a69d0> com.placemarker.places (Placeholder) <file:///private/var/mobile/Containers/Bundle/Application/81C017B2-D164-4083-9A4A-010C3CE0EF39/-5310997826876130007.app> withPhase:1 | |
Jan 27 19:39:29 spaziale lsd[82] <Warning>: LaunchServices: Updating installPhase for parent <NSProgress: 0x146660300> : Parent: 0x0 / Fraction completed: 0.5800 / Complete |
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
# detect `$rvm_path` | |
if [ -z "${rvm_path:-}" ] && [ -x "${HOME:-}/.rvm/bin/rvm" ] | |
then rvm_path="${HOME:-}/.rvm" | |
fi | |
if [ -z "${rvm_path:-}" ] && [ -x "/usr/local/rvm/bin/rvm" ] | |
then rvm_path="/usr/local/rvm" | |
fi | |
# load environment of current project ruby | |
if |
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
javascript:var data = prompt("Please paste the row:"); | |
var month_data = jQuery.map(data.split("\t"), function(elem) { | |
return Number(elem.trim()) * 1000; | |
}); | |
var months = [ | |
"jan", | |
"feb", | |
"mar", |
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
class Api::ApplicationController < RocketPants::Base | |
include AbstractController::Callbacks | |
include ActionController::Head | |
... | |
# for some reason, instrumentation only works if this is at the end of the class | |
include ActionController::Instrumentation | |
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
class Post < ActiveRecord::Base | |
has_many :comments | |
has_many :latest_comments, :class => 'Comments', :order_by => 'created_at DESC', :limit => 3 | |
end |