Skip to content

Instantly share code, notes, and snippets.

View levibrown's full-sized avatar
:octocat:

Levi Brown levibrown

:octocat:
  • Bend, Oregon
  • 23:19 (UTC -07:00)
View GitHub Profile
require "bundler/capistrano"
$:.unshift(File.expand_path('./lib', ENV['rvm_path']))
require "rvm/capistrano"
set :rvm_ruby_string, '1.9.2@sinatroxy'
set :rvm_type, :system
set :bundle_flags, "--deployment"
set :application, "sinatroxy"
set :repository, "xxx@yyy:sinatroxy"
au FileType qf call AdjustWindowHeight(3, 10)
function! AdjustWindowHeight(minheight, maxheight)
let l = 1
let n_lines = 0
let w_width = winwidth(0)
while l <= line('$')
" number to float for division
let l_len = strlen(getline(l)) + 0.0
let line_width = l_len/w_width
let n_lines += float2nr(ceil(line_width))
@levibrown
levibrown / _.md
Created May 11, 2014 18:39
practice
/* global require, module */
var EmberApp = require('ember-cli/lib/broccoli/ember-app');
var fileMover = require('broccoli-file-mover');
var vendorTree = fileMover('vendor', {
files: {
'ember/index.js': 'ember/ember.js',
'ember-prod/index.js': 'ember/ember.prod.js'
}
@levibrown
levibrown / adapters.application.js
Last active August 29, 2015 14:28
new serializer test
import ActiveModelAdapter from 'active-model-adapter';
import ENV from 'self-storage-search/config/environment';
export default ActiveModelAdapter.extend({
host: 'http://g5-inventory.herokuapp.com/',
namespace: 'api/v1'
});
@levibrown
levibrown / nginx.conf
Created January 19, 2017 19:21 — forked from cpswan/nginx.conf
Using nginx to proxy to an AWS ELB
daemon off;
worker_processes 1;
events { worker_connections 1024; }
http{
sendfile on;
// gif by dave aka @beesandbombs :)
int[][] result;
float t, c;
float ease(float p) {
return 3*p*p - 2*p*p*p;
}
float ease(float p, float g) {
@levibrown
levibrown / kube_commands.rb
Last active July 15, 2019 22:35
a cli for common g5 kube commands
#!/usr/bin/env ruby
# Setup:
# 1) `gem install highline`
# 2) save this file to a local folder
# 3) rename the file to remove extension `mv kube_commands.rb kube_commands`
# 4) change permissions `chmod 755 kube_commands`
# 5) link to your /usr/local/bin `ln -s $PWD/kube_commands /usr/local/bin/`
# 6) in a new shell you should now be able to run `kube_commands`
# 7) add new commands and add to this gist

For handling authentication with Auth0 we will continue to use our existing gems (g5_authenticatable and g5_authenticatable_api.) The g5_authentication_client gem will be removed as it is no longer applicable. In most cases we should only need to install g5_authenticatable. Moving forward with v2 these codebases will be in the g5search github org and once fully released we can depricate or remove the code in the G5 org.

Installing

  1. Update gem version
  source 'https://gem.fury.io/g5dev/' do
    gem 'g5_authenticatable', '~> 2.0.6.pre.alpha.gem'
  end
@levibrown
levibrown / doc-table.md
Created May 24, 2022 18:53 — forked from antfu/doc-table.md
Doc Table in Markdown

Example

Name

Description