Skip to content

Instantly share code, notes, and snippets.

@redhedded1
redhedded1 / main.js
Created April 20, 2015 13:37
stripe response token generation
Stripe.setPublishableKey('pk_test_5BzYDSKjzUu2BcVFyKoXpn8h');
function stripeResponseHandler(status, response) {
$form = $('#payment-form');
if (response.error) {
// re-enable the submit button
$('#pay-now-submit').removeAttr("disabled");
// show hidden div
document.getElementById('a_x200').style.display = 'block';
// show the errors on the form
@redhedded1
redhedded1 / HomeController.php
Created April 20, 2015 13:39
respond to Stripe response
public function donate_store(CreateDonationRequest $request){
\Stripe\Stripe::setApiKey(getenv("STRIPE_PRIVATE_KEY"));
try {
if($request->input('donation_amt') == 'other'){
$amount = $request->input('donation_specified_amt');
}else{
$amount = $request->input('donation_amt');
}
@redhedded1
redhedded1 / index.html
Created July 31, 2015 06:31
overscroll fix
<script> // Init Overscroll for Sports By Year and Hall of Fame Members
jQuery(document).ready(function($) {
$(function(o){
o = $("#overscroll-year-wrapper ul").overscroll({
cancelOn: '.no-drag',
direction: 'horizontal',
captureThreshold: 3, // The number of mouse move events before considering the gesture a "drag"
driftDecay: 1.1, // The linear-friction coefficient for drift decay (must be > 1)
driftSequences: 120, // The number of animation frames to constrain a drift to
@redhedded1
redhedded1 / 0_reuse_code.js
Created January 19, 2017 15:45
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@redhedded1
redhedded1 / docker-compose.yml
Last active February 5, 2017 20:35
Docker compose file for monitoring/logging services
version: '2'
services:
elasticsearch:
image: elasticsearch
container_name: elasticsearch
ports:
- "9200:9200"
- "9300:9300"
restart: always
@redhedded1
redhedded1 / docker-compose.yml
Created January 20, 2017 18:04
LaraDock YAML for use with fluentd logging services
version: '2'
services:
### Applications Code Container #############################
applications:
image: tianon/true
volumes:
- ../:/var/www
@redhedded1
redhedded1 / redis.conf
Last active February 21, 2018 14:53
Redis
# Redis configuration file example.
#
# Note that in order to read the configuration file, Redis must be
# started with the file path as first argument:
#
# ./redis-server /path/to/redis.conf
# Note on units: when memory size is needed, it is possible to specify
# it in the usual form of 1k 5GB 4M and so forth:
#
@redhedded1
redhedded1 / keybase.md
Created July 25, 2019 13:40
keybase.md

Keybase proof

I hereby claim:

  • I am redhedded1 on github.
  • I am lball (https://keybase.io/lball) on keybase.
  • I have a public key ASDKbpbR-gNF5CqKd7xjBeNPxi3OocIqSXXOTcA5Nt7scQo

To claim this, I am signing this object: