Skip to content

Instantly share code, notes, and snippets.

View jodell's full-sized avatar

Jeffrey ODell jodell

View GitHub Profile
import createAuth0Client from '@auth0/auth0-spa-js'
import { computed, reactive, watchEffect } from 'vue'
let client
const state = reactive({
loading: true,
isAuthenticated: false,
user: {},
popupOpen: false,
error: null,
@mwlang
mwlang / example.md
Last active November 18, 2019 02:41
Ruby Z-Table lookup class. Given a z-score, return approximate percentile rank.
@firedev
firedev / routing_helper.rb
Created January 21, 2014 14:41
Fix for Rails locales when testing with Rspec, Capybara etc...
# spec/support/routing_helper.rb
class ActionDispatch::Routing::RouteSet::NamedRouteCollection::UrlHelper
def call(t, args)
t.url_for(handle_positional_args(t, args, { locale: nil }.merge( @options ), @segment_keys))
end
end
@iamleeg
iamleeg / UIColor_literal.mm
Last active December 29, 2015 03:09
UIColor literals.
#import <UIKit/UIKit.h>
UIColor * operator"" _c(unsigned long long color)
{
unsigned long long redComponent = (color & 0xff0000 >> 16);
unsigned long long greenComponent = (color & 0x00ff00) >> 8;
unsigned long long blueComponent = color & 0xff;
float red = redComponent / 255.0;
float green = greenComponent / 255.0;
float blue = blueComponent / 255.0;
@adamwiggins
adamwiggins / adams-heroku-values.md
Last active November 5, 2024 21:40
My Heroku values

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style

@apangeajwrubel
apangeajwrubel / gist:4953849
Created February 14, 2013 16:11
our unicorn config
rails_env = ENV['RAILS_ENV'] || 'production'
preload_app true
# number of workers - makes sure this matches memory config
worker_processes Integer(ENV['UNICORN_WORKERS'] || 2)
# restart workers if request takes too long
timeout Integer(ENV['UNICORN_TIMEOUT'] || 25)
# Only allow reasonable backlog of requests per worker
@subdigital
subdigital / pns.m
Created January 5, 2013 21:59
What are your favorite Xcode Snippets? Add them in the comments.
// Property Nonatomic Strong
// Platform: All
// Completion Scopes: ClassInterfaceMethods
@property (nonatomic, strong) <# class_name #> *<# variable_name #>;
@apeckham
apeckham / debugging.txt
Created June 13, 2012 22:46
running librato's statsd chef recipe on ec2 with knife-solo, and sending data from Rails
vim /etc/statsd/config.js
add console backend:
"backends": [
"./backends/graphite",
"./backends/console",
"statsd-librato-backend"
],
restart statsd
@jodell
jodell / gist:1878495
Created February 21, 2012 19:55
vim osx installation
# From http://brilliantcorners.org/2011/02/building-vim-on-osx-snow-leopard/
# fetch the source into a vim directory
hg clone https://vim.googlecode.com/hg/ vim
cd vim
# make sure you're up to date
hg pull
hg update
# Uncrustify 0.59
###########################################################################
# nah_xcode_uncrustify.rb default
# configuration
#
# config_version: 1.1.0
#
# Default uncrustify config to use for
# the nah_xcode_uncrustify.rb script