Skip to content

Instantly share code, notes, and snippets.

<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Requests;
use App\Http\Controllers\Controller;
use App\SteamUser;
use App\Http\Requests\CreateSteamUserRequest;
@chandrewz
chandrewz / email.html
Created January 9, 2017 20:53
HTML in Emails for Buttons
<!doctype html>
<html>
<head>
<meta name="viewport" content="width=device-width" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<style>
.btn {
box-sizing: border-box;
width: 100%; }
.btn {
@chandrewz
chandrewz / us-state-names-abbrevs-slug.php
Last active December 18, 2015 14:06 — forked from maxrice/us-state-names-abbrevs.php
US State Names & Abbreviations as PHP Arrays
<?php
/* From https://www.usps.com/send/official-abbreviations.htm */
$states_slug = array(
'AL'=>'alabama',
'AK'=>'alaska',
'AZ'=>'arizona',
'AR'=>'arkansas',
'CA'=>'california',
'CO'=>'colorado',
<?php
/*
Fireboard 1.0.x to phbBB2 2.0.x converter
0.0 Based on the phpbb2tosb.php script by Olle Johansson http://mambo.theyard.org/ and from Marcos Osorno http://www.blort.com
0.1 Based upon updated script from http://www.phpbb.com/community/viewtopic.php?f=10&t=371271&p=2026820
0.2 The tweeks here are based on
http://www.phpbb.com/community/viewtopic.php?f=10&t=588149#p3598205
0.3 Slight change to avoid the ' issue (breaking the script if ' appears)
* Tested on: phpBB 2.0.22, Joomla 1.0.13 w/ Fireboard 1.0.3, PHP 5.2.3, MySQL 5.0.45
class Phone
def initialize(number)
@number = number
end
def number
# strip all chars except numbers
number = @number.gsub(/[^0-9]/i, '')
class Anagram
def initialize(anagram)
@anagram = anagram
# hash calculates # of times seen per letter
@hash = Hash.new
anagram.each_char do |c|
if @hash[c]
@hash[c] = @hash[c] + 1
@chandrewz
chandrewz / README.md
Created January 6, 2014 22:16
@jbaudanza hi, how would one get started with your singleservingbitcoin? blank README.md!

singleservingbitcoin