Skip to content

Instantly share code, notes, and snippets.

Avatar

Brian Boyko brianboyko

View GitHub Profile
View Deck Shuffler On Demand.markdown

Deck Shuffler On Demand

This takes the deck shuffler which loads automatically and makes it only run on demand at the push of a button.

A Pen by Brian Boyko on CodePen.

License.

View gist:0f6c0486627668bc9ca9
---
layout: page
title: Donation Form
omit_title_suffix: true
cssid: home
nav_order: 0
stylesheet: page.css
---
<!-- Form handler: "https://thisguy-checkout.herokuapp.com/"
View gist:18962d7c16ebb548cdba
#!/usr/bin/env ruby
require 'json'
require 'logger'
require 'stripe'
require 'sinatra'
require 'thin'
require 'mailgun'
require 'pushover'
View gist:fb65cc80baeedb385942
#!/usr/bin/env ruby
require 'json'
require 'logger'
require 'stripe'
require 'sinatra'
require 'thin'
require 'mailgun'
require 'pushover'
View gist:0476f6554cb0201a6e2f
def log_donation(email, amount)
uri = URI.parse(ENV["postgres://qucsbxejiqhfnl:CQkNveZA21tUrTs046lhgHcBGg@ec2-54-227-247-161.compute-1.amazonaws.com:5432/d1e3fv1kfb1muf"])
conn = PG.connect(
:database => uri.path[1..-1]
:user = uri.user
:password = uri.password
:host = uri.host
View out.rb
#!/usr/bin/env ruby
require 'pg'
#------------
def output_data
uri = URI.parse(ENV["DATABASE_URL"])
conn = PG.connect(
:dbname => uri.path[1..-1],
:user => uri.user,
:password => uri.password,
View output.rb
#!/usr/bin/env ruby
require 'pg'
require 'sinatra'
#------------
begin
uri = URI.parse(ENV["DATABASE_URL"])
conn = PG.connect(
:dbname => uri.path[1..-1],
:user => uri.user,
:password => uri.password,
View gist:16fb5b51e152f650e0cc
#!/usr/bin/env ruby
require 'json'
require 'logger'
require 'sinatra'
require 'thin'
require 'pushover'
require 'pg'
#------------
begin
View gist:f240f0204275fa463c17
2015-06-27T17:20:13.814319+00:00 heroku[router]: at=info method=GET path="/count_serve.json" host=thisguy-donation.herokuapp.com request_id=94df5f59-0c06-4427-b3e0-16974a30b3e3 fwd="99.156.92.32" dyno=web.1 connect=1ms service=35ms status=200 bytes=197
2015-06-27T17:20:13.811257+00:00 app[web.1]: 99.156.92.32 - - [27/Jun/2015:17:20:13 +0000] "GET /count_serve.json HTTP/1.1" 200 28 0.0087
2015-06-27T17:20:25.345007+00:00 app[web.1]: Thin web server (v1.6.3 codename Protein Powder)
2015-06-27T17:20:25.345012+00:00 app[web.1]: Maximum connections set to 1024
2015-06-27T17:20:25.345016+00:00 app[web.1]: I, [2015-06-27T17:20:25.052462 #3] INFO -- : Got a donation request for $10.0 USD from brian.boyko@gmail.com.
2015-06-27T17:20:25.345014+00:00 app[web.1]: Listening on 0.0.0.0:40452, CTRL+C to stop
2015-06-27T17:20:26.028508+00:00 heroku[router]: at=info method=POST path="/charge" host=thisguy-donation.herokuapp.com request_id=89104f17-6393-41ea-a767-ad87913e273f fwd="99.156.92.32" dyno=web.1 connect=1ms service=
You can’t perform that action at this time.