Skip to content

Instantly share code, notes, and snippets.

View localredhead's full-sized avatar

Levi Strope localredhead

View GitHub Profile
@localredhead
localredhead / grrrr.el
Last active August 29, 2015 14:05
pffft.
(add-hook 'ruby-mode-hook
(lambda ()
(run-at-time 10 nil
(lambda ()
(robe-mode 1)
(robe-start)))))
@localredhead
localredhead / delete branches
Created October 16, 2014 22:46
delete all branches
$ git branch | grep -v "master" | xargs git branch -D
# spec/lib/tasks/notification_rake_spec.rb
require 'spec_helper'
describe 'notifications:weekly' do
include_context "rake"
let(:users){ [double(:user)] }
let(:user_deliveries){ double(:user_deliveries) }
before{ User.stub(:all).and_return( users ) }
npm install -g jsxhint

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@localredhead
localredhead / restclient
Created March 31, 2015 03:15
Restclient file
## address bug
:var = GQh6z916qptswjtTd4KV
PUT http://client.archer.dev/svc/user/addresses/xxxxx
HTTP_AUTHORIZATION: :var
Content-Type: application/json
{
"address": {
"address": {
"address1": "1801 East St.",
"address2": "",
@localredhead
localredhead / development.rb
Created April 10, 2015 01:26
CORS development.rb
config.middleware.insert_before 0, "Rack::Cors", :debug => true, :logger => (-> { Rails.logger }) do
allow do
origins '*'
resource '/cors',
:headers => :any,
:methods => [:post],
:credentials => true,
:max_age => 0

One of my favorite past times is to look at the notebooks of famous scientists. Da Vinci's notebook is well known, but there plenty others. Worshipping Da Vinci like no other, I bought a Think/Create/Record journal, used it mostly to keep jot down random thoughts and take notes. This was great in the beginning, but the conformity of lines drove me nuts. Only moleskines made blank notebooks, so I had to buy one.

At the same time I started a freelance project. The project itself is irrelevant, but suffice to say it was very complex and spanned several months. It seemed like a perfect opportunity to use the moleskine. Looking back, all my entries fell under few categories:

  • Todo
  • Question
  • Thought
  • Bug
  • Feature
require 'rdoc/task'
namespace :doc do
namespace :generate do
## to regenerate documentation
## bundle exec rake doc:generate:reapi
RDoc::Task.new :api do |rd|
# config example
# http://snipplr.com/view/27986/
rd.rdoc_dir = 'doc/api/v2'
@localredhead
localredhead / package.json
Created June 27, 2017 05:28 — forked from pelle/package.json
Uport Connect - React Native example
{
"name": "exampleapp",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node_modules/react-native/packager/packager.sh --nonPersistent",
"test": "jest",
"build-uport-connect": "node_modules/.bin/derequire node_modules/uport-connect/dist/uport-connect.js >src/vendor/uport-connect.js"
},
"dependencies": {