Skip to content

Instantly share code, notes, and snippets.

View ghettoeinstein's full-sized avatar

ghettoeinstein ghettoeinstein

View GitHub Profile
@ghettoeinstein
ghettoeinstein / stdIN.go
Created May 26, 2018 16:37
Reverse and capitalize strings from standard input in Go
package main
import (
"bufio"
"fmt"
"os"
"strings"
)
func reverseText(s string) string {
@ghettoeinstein
ghettoeinstein / keybase.md
Created September 8, 2016 20:41
Proving my github

Keybase proof

I hereby claim:

  • I am ghettoeinstein on github.
  • I am calebsaunders (https://keybase.io/calebsaunders) on keybase.
  • I have a public key whose fingerprint is 5EEF F973 7D9D AD8B E876 8A1B 9DB4 C665 ABF8 3B07

To claim this, I am signing this object:

// Write a program that prints the SHA256 hash of its standard
// input by default but supports a command-line flag to print
// the SHA384 or SHA512 hash instead.
// Exercise 4.2 from "The Go Programming Language"
package main
import (
"bufio"
@ghettoeinstein
ghettoeinstein / rubymotion_constraint_helpers
Created July 25, 2015 14:56
RubyMotion Constraint Helpers Module
#Ported from one of Erica Sadun's Books. Can't remember which one
module ConstraintHelpers
COOKBOOK_PURPLE_COLOR = UIColor.colorWithRed(0.20392, green:0.19607, blue:0.61176, alpha:1)
#define BARBUTTON(TITLE, SELECTOR) UIBarButtonItem.alloc.initWithTitle(TITLE, style:UIBarButtonItemStylePlain, target:self, action:SELECTOR)
def bar_button(title, selector)
@ghettoeinstein
ghettoeinstein / wordpress_install.rb
Last active February 14, 2016 19:44
Install Wordpress via Ruby Script on Linux OS.
# I use this script, because instead of learning Chef/Puppet/insert other Automation Tool, I have decided to lean on my existing fountain of ruby
# knowledge to automate wordpress installs. I use anUbuntu 14.04.2 LTS distro as my primary server. My ruby version at the time of
# authoring is ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-linux]. I can not guarantee that the below script will be beneficial or harmful for you.
# USE AT YOUR OWN RISK!
# **Addendum 2016-02-14** THIS SCRIPT IS NOT A COMPLETE IMPLEMENTATION.