Skip to content

Instantly share code, notes, and snippets.

Ernest Surudo elsurudo

Block or report user

Report or block elsurudo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
AllThingsSmitty / script-loaded.js
Created May 5, 2015
Check if any given script has loaded
View script-loaded.js
var myScript = document.createElement('script');
myScript.src = '';
myScript.onload = function() {
console.log('jQuery loaded.');
DimaVartanian / CrashlyticsSwift.Swift
Last active Jun 8, 2019
Crashlytics CLS_LOG() in Swift
View CrashlyticsSwift.Swift
// Created by Dima Vartanian on 10/29/15.
import Foundation
import Crashlytics
// this method gives us pretty much the same functionality as the CLS_LOG macro, but written as a Swift function, the only differences are that we have to use array syntax for the argument list and that we don't get see if the method being called is a class method or an instance method. We also have to define the DEBUG compiler flag with -D DEBUG.
/// Usage:
josheinstein / gist:5586469
Last active Dec 19, 2018
Handle back button issues with Twitter Bootstrap's tab component.
View gist:5586469
// Handle back button issues with Twitter Bootstrap's tab component.
// Based on:
// It has been changed to avoid the following side effects:
// - Switching tabs was being added to navigation history which is undesirable
// (Worked around this by using location.replace instead of setting the hash property)
// - Browser scroll position was lost due to fragment navigation
// (Worked around this by converting #id values to #!id values before navigating.)
$(document).ready(function () {
if (location.hash.substr(0,2) == "#!") {
View ActiveSupport2iOS_Timezones.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
<string>Map Rails ActiveSupport timezones to iOS readable timezone IDs.</string>
peter /
Created Jun 30, 2012
Creating and Deploying an EdgeRails (Rails 4) Application to Heroku
# 0. Make sure you have Ruby 1.9.3 installed, and optionally RVM and PostgreSQL
# 0.2 If you are on the Mac, make sure you have a c compiler by installing XCode Command Line Tools or gcc4.2 with homebrew
# 0.5 Make sure you have bundler version ~> 1.2 as Rails depends on it
gem install bundler
# 1. Get edge Rails source (master branch)
git clone
You can’t perform that action at this time.