Skip to content

Instantly share code, notes, and snippets.

View deangerber's full-sized avatar

Dean Gerber deangerber

View GitHub Profile

Keybase proof

I hereby claim:

  • I am deangerber on github.
  • I am deangerber (https://keybase.io/deangerber) on keybase.
  • I have a public key ASDHOK59bqIDgkJ5OsyaoGtJ9kdiqC2tQYJ6hGte0YjA-go

To claim this, I am signing this object:

@deangerber
deangerber / StringCalculator
Created February 18, 2015 08:04
Feedback for https://github.com/StevenMcD/swift_katas to be pasted into Xcode playground.
// Better class name. Removed unneeded ; from code lines.
class StringCalculator {
// Made class level method
// Removed unneeded () around return value
class func add(numbers: String) -> Int {
// Removed unneeded () around if condition
if numbers.isEmpty {
return 0
}
@deangerber
deangerber / basic_iptables.sh
Created September 6, 2011 17:17
Simple iptables firewall setup script.
#! /bin/bash
iptables -F
iptables -X
echo Allow ssh
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
echo Allow http and https
iptables -A INPUT -p tcp --dport 80 -j ACCEPT
iptables -A INPUT -p tcp --dport 443 -j ACCEPT
echo Allow pop, imap and smtp
iptables -A INPUT -p tcp --dport 25 -j ACCEPT