Skip to content

Instantly share code, notes, and snippets.

@wasnotrice
wasnotrice / bash.generate.random.alphanumeric.string.sh
Last active July 11, 2016 16:18 — forked from earthgecko/bash.generate.random.alphanumeric.string.sh
shell/bash generate random alphanumeric string
#!/bin/bash
# bash generate random alphanumeric string
#
# bash generate random 32 character alphanumeric string (upper and lowercase) and
# NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
# bash generate random 32 character alphanumeric string (lowercase only)
cat /dev/urandom | /usr/bin/env LC_CTYPE=C tr -dc 'a-km-z02-9' | fold -w 32 | head -n 1
@wasnotrice
wasnotrice / eq_buddy.rb
Last active January 3, 2016 19:09 — forked from KCErb/Subclass
class EQBuddy < Shoes
url '/', :begin_the_testing
def begin_the_testing
button "Begin the Testing!" do
alert "Hello EQBuddy"
end
end
end
@wasnotrice
wasnotrice / 3buttons_on_slot1.rb
Created June 29, 2012 16:36 — forked from ashbb/3buttons_on_slot1.rb
Have a trial of ShoesComposite and ShoesLayout for Shoes 4
require 'java'
require 'swt'
module Swt
include_package 'org.eclipse.swt.graphics'
include_package 'org.eclipse.swt.events'
module Widgets
import org.eclipse.swt.widgets.Layout
end
end
@wasnotrice
wasnotrice / shoes_tk.rb
Created May 25, 2012 04:32 — forked from steveklabnik/shoes_tk.rb
Some simple architecture decision options for shoes 4
require 'tk'
class Shoes
module Tk
class App
def initialize
@root = TkRoot.new
end
def button(title, &blk)