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
@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 / .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 / 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 / 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 / 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 / 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
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 / list.txt
Created June 9, 2017 04:57
Precious Cargo®
Precious Cargo® Infant Jersey Bib. CAR30 $1.68
Precious Cargo® Infant Terry Bib. CAR31 $1.94
Precious Cargo® Infant Core Cotton Tee. CAR54I $1.94
Precious Cargo® Toddler Full-Zip Hooded Sweatshirt. CAR78TZH $10.39
Precious Cargo® Toddler Core Cotton Tee. CAR54T $2.07
Precious Cargo® Toddler Pullover Hooded Sweatshirt. CAR78TH $7.79
Precious Cargo® Infant Full-Zip Hooded Sweatshirt. CAR78IZH $9.09
@edwardsharp
edwardsharp / list.txt
Created June 9, 2017 08:11
june 7, 2017, 2:21 AM
v0.9.
in context of // in relation to: a short performance wedged in/between** other performancez on a particular evening, of a particular theme forming (a(d)(just)) situation(z)
1. in, perhapz, a more broad context, perhapz related more to ppl specifically, rather than (or perhapz in/between) just situationz
a. "hackathon"** as a general contextual starting point.
i. in a broad/general/utopic way: community input on interest topics related to software generally.
ii. however specific starting pointz could include: D.I.Y. digital content, or a panoply of digital thingz, or a panoply of authorship
1. as a more specific example: https://lacunaclub.github.io/wiki/
2. so, the wiki as another general contextual starting point: text content somewhere in/between poetic diary and encyclopedic canon (um, cannon?).
3. ppl gather @ppl and write shit, && edit shit. could be private, could be pubic, but be either/or at (diff!)erent pointz in time. observe diff(z).
@edwardsharp
edwardsharp / just-sayin.txt
Created June 9, 2017 08:19
but like, srsly, ai ain't got shit until the brain's wire'd
fingerz == okay
camera == heating up
voice == p good
brain == ai on fire