View putsbox-reset-password.html
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="http://putsbox.com" />
<title>Test</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
View index.html
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-3914566-6', 'auto');
ga('send', 'pageview');
</script>
View Gemfile
source 'https://rubygems.org'
gem 'sinatra'
gem 'active_support'
View query.go
package main
import (
"fmt"
"github.com/crowdmob/goamz/aws"
"github.com/crowdmob/goamz/dynamodb"
"log"
"os"
"time"
)
View scan.rb
require 'aws-sdk'
require 'pry-byebug'
class MobyEvent
SCAN_WORKERS = 4
class << self
def client
@dynamodb ||= Aws::DynamoDB::Client.new(
region: 'us-east-1',
View gist:418119705b569fb2f9a5
# lib/liquid_i18n_rails.rb
module LiquidI18nRails
def t(string)
I18n.t(string.to_sym)
end
end
# config/initializers/liquid.rb
require 'liquid_i18n_rails'
Liquid::Template.register_filter LiquidI18nRails
View gist:1ed1a7060a80c2e33b64
# lib/liquid_i18n_rails.rb
module LiquidI18nRails
def t(string)
I18n.t(string.to_sym)
end
end
# config/initializers/liquid.rb
require 'liquid_i18n_rails'
Liquid::Template.register_filter LiquidI18nRails
View response_builder.js
response.status = 200;
var payload = JSON.parse(request.body);
response.headers['Content-Type'] = 'application/json';
response.body = { "request_id": payload.request_id, "summary": "Hello " + payload['order']['id'] };
View osx-for-hackers.sh
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
green='\033[0;32m'
View wombat_mutex.rb
module Wombat
# @example Lock while executing `do_something` or expire in 10 seconds
# Wombat::Mutex.exclusive 'my_key', 10 do
# do_something
# end
#
class Mutex
class << self
# @param key [String] the lock key
# @param ttl [Fixnum] time to live in seconds