Skip to content

Instantly share code, notes, and snippets.

View edwardsharp's full-sized avatar
🥺
i'm a teapot

edward sharp edwardsharp

🥺
i'm a teapot
View GitHub Profile
publish 1 minute of audio/video, don't think about it too much.
collage?
what about a photo?
maybe just a little dance & little ditty?
gaberdine
a few linkz might save yr life.
@edwardsharp
edwardsharp / 1496830836.txt
Created June 7, 2017 10:29
list #1496830836
walk around the perimeter
erase without destroying
bitcoin transaction. do it, xfer some crypto currency
plan a party
call a random phone number
fill out a comment card
@edwardsharp
edwardsharp / rails_factory.rb
Last active March 8, 2017 06:05
rails drb factory
require 'config/environment'
require 'drb'
DRBURI = "druby://0.0.0.0:6666" #"drbunix://#{File.join(Dir.pwd,'socket')}"
# NOTE: A dRuby reference to an object is not sufficient
# prevention from garbage collection!
class RailsFactory
def initialize
@edwardsharp
edwardsharp / install-docker-compose.sh
Created March 1, 2017 10:31
install docker compose sh
#!/bin/bash
#this will setup docker-compose on a coreOS (or similar) box
# use sudo ./install-docker.compose.sh
mkdir -p /opt/bin
curl -L `curl -s https://api.github.com/repos/docker/compose/releases/latest | jq -r '.assets[].browser_download_url | select(contains("Linux") and contains("x86_64"))'` > /opt/bin/docker-compose
chmod +x /opt/bin/docker-compose
@edwardsharp
edwardsharp / my_class.rb
Created September 20, 2016 03:21
httparty cookie
# redash api wrapper class, example:
# require 'redash'
# redash = Redash.new('email', 'password')
# redash.logged_in?
require 'httparty'
class MyClass
include HTTParty
@edwardsharp
edwardsharp / .drone.yml
Created September 15, 2016 05:15
drone config for self-hosted drone (rancher)
image: ruby2.0.0
env:
- RAILS_ENV=test
script:
- cp config/database.drone.yml config/database.yml
- bundle install
- psql -c 'create database test;' -U postgres -h 127.0.0.1
- bundle exec rake db:schema:load
- bundle exec rspec spec
services:
@edwardsharp
edwardsharp / text_color.rb
Created September 3, 2016 15:58
high contract text color
def text_color
#simple lumen scale, (255 + 255 + 255 = 765) / 2 = 382.5
# color = '#ff6600'
lumen = 0
lumen += color[1..2].hex
lumen += color[3..4].hex
lumen += color[5..6].hex
if lumen > 382.5
return '#000000'
@edwardsharp
edwardsharp / thickbox.js
Created January 16, 2014 19:40
thickbox.js iPad scrolling hack
jQuery(document).ready(function(){
// start hack #sorry
if ("ontouchstart" in document.documentElement){
jQuery('html').addClass('touch');
}
var style = document.createElement('style');
style.type = 'text/css';
hackystyle = '.touch #TB_window {height: 90%; -webkit-overflow-scrolling: touch !important;overflow: scroll !important;}';
if (style.styleSheet) {
// IE
@edwardsharp
edwardsharp / bourbon.pd
Created November 26, 2013 16:53
bourbon.pd
#N canvas 0 22 1169 730 10;
#X obj 5 117 metro;
#X obj 48 -54 tgl 15 0 empty empty empty 17 7 0 10 -260097 -257985
-1 0 127;
#X obj 67 -54 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10
-260097 -257985 -1 66 256;
#X obj 5 140 f;
#X obj 39 140 + 1;
#X obj 1 -40 hradio 16 1 0 10 empty empty empty 0 -8 0 10 -260097 -257985
-1 0;
@edwardsharp
edwardsharp / drone07.pd
Created November 26, 2013 16:52
drone07.pd
#N canvas 0 0 500 500 ;
#X obj 299 414 osc~ 44;
#X obj 100 118 osc~ 8.3;
#X obj 200 118 osc~ 1.5;
#X obj 150 177 *~;
#X obj 399 118 osc~ 7.5;
#X obj 499 118 osc~ 0.1;
#X obj 449 177 *~;
#X obj 299 237 *~;
#X obj 299 296 *~ 88;