Skip to content

Instantly share code, notes, and snippets.

Seph Lietz sephlietz

Block or report user

Report or block sephlietz

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View AppThatUsesRetry.scala
import scala.concurrent.duration._
object AppThatUsesRetry extends App {
Retry(backoff = 30 seconds) {
throw new Exception("fail every 30 seconds")
sephlietz / Rakefile
Created Feb 18, 2014
Rake tasks to deploy jekyll build with rsync
View Rakefile
desc "Build jekyll locally"
task :build do
sh "bundle exec jekyll build"
desc "Deploy _site"
task :deploy => :build do
user = 'user'
host = ''
release_dir ='%Y%m%d%H%M%S')
sephlietz / gist:8892395
Created Feb 9, 2014
Check if two positive integers will result in an overflow
View gist:8892395
public boolean willPositiveIntegerAdditionOverflow(int a, int b) {
if (a < 0 || b < 0) {
throw new IllegalArgumentException("this only works with two positive integers");
return (a > (Integer.MAX_VALUE - b));
You can’t perform that action at this time.