Skip to content

Instantly share code, notes, and snippets. stephancom

Block or report user

Report or block stephancom

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
View React Native clear all
watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf $TMPDIR/npm-* && rm -rf $TMPDIR/haste-* && rm -rf $TMPDIR/metro-* && rm -rf node_modules && npm install && rm -rf ios/Pods && cd ios && pod cache clean --all && pod repo update && pod install && ./android/gradlew clean -p ./android/ && rm -rf ios/build && rm -rf ~/Library/Developer/Xcode/DerivedData && npm start -- --reset-cache
View table_helpers.rb
module TableHelpers
module ArrayMethods
def find_row(expected_row)
find_index do |row|
expected_row.all? do |expected_column|
first_column = row.find_index do |column|
content = normalize_content(column.content)
expected_content = normalize_content(expected_column)
matching_parts = expected_content.split(/\s*\*\s*/, -1).collect { |part| Regexp.escape(part) }
#!/usr/bin/env bash

# Assuming OS X Yosemite 10.10.4

# Install XCode and command line tools
# See
# See
xcode-select --install
View ng-tips-v105.tpl
ng-model-options="{debounce: 500}"
JamesHagerman / gist:3662fa257366f5f4345f
Last active Aug 29, 2015
RedCloth + Monkey Patch = Prism working
View gist:3662fa257366f5f4345f
# RedCloth doesn't work well with the Prism syntax highlighting lirbary due to the way it handles <code> blocks when it comes to newlines using bc..
# But we can add a config/initializers/redcloth.yml file to our Rails app and monkey patch it so it does.
# So, this monkey patch is to make RedCloth not split the bc.. code blocks on newlines.
# To actually use it with Prism the syntax should look like this:
# bc(language-ruby).. whatever multi-line code you want to display goes here
module RedCloth::Formatters::HTML
def bc_open(opts)
opts[:block] = true
dolzenko / sidekiq_paper_trail_middleware.rb
Created Dec 18, 2014
Make originator of change tracked with paper_trail available in Sidekiq background workers
View sidekiq_paper_trail_middleware.rb
module Acme
module Sidekiq
module PaperTrailMiddleware
class Client
# @param [Object]
# @param [Hash] job
def call(_, job, *)
job['whodunnit'] = ::PaperTrail.whodunnit

Ello API

This is a basic exploration of the Ello API. Completely unofficial, your mileage my vary, don't smash their servers as they are likely very busy.

Methods return HTML for their representation where appropriate which is a nice little pattern. Everything returns application/json.

Like this:

   "id": <new post ID>,
mikestone14 / gist:11198630
Created Apr 23, 2014
Getting a GoDaddy domain to point to a Heroku app.
View gist:11198630
Threeethan / gist:8772775
Created Feb 2, 2014
BlinkyTape Interrupt Example
View gist:8772775
#include <FastSPI_LED2.h>
#define DEBUG
#define LED_COUNT 60 // BlinkyTape has 60 LEDs!
struct CRGB leds[LED_COUNT]; // this struct contains 60 CRGB values. This is where
#define PIN_BUTTON 10
You can’t perform that action at this time.