Skip to content

Instantly share code, notes, and snippets.

John Schank jschank

Block or report user

Report or block jschank

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
@jschank
jschank / # neo4j - 2019-04-01_15-01-05.txt
Created Apr 1, 2019
neo4j on macOS 10.14.4 - Homebrew build logs
View # neo4j - 2019-04-01_15-01-05.txt
Homebrew build logs for neo4j on macOS 10.14.4
Build date: 2019-04-01 15:01:05
View git config
user.name=John Schank
user.email=jschank@ddcpublicaffairs.com
credential.helper=osxkeychain
core.excludesfile=/Users/jschank/.gitignore_global
core.filemode=true
core.autocrlf=input
core.pager=diff-so-fancy | less --tabs=4 -RFX
core.editor=code -n -w
color.ui=true
color.branch=auto
View FizzBuzz with no conditionals
#! /usr/bin/ruby
fizzy = [1,0,0]
buzzy = [1,0,0,0,0]
1.upto(100) do |i|
fizzy.rotate!
buzzy.rotate!
str = i.to_s * (1 - (fizzy[0] | buzzy[0]))
str << "Fizz" * fizzy[0]
@jschank
jschank / Gemfile
Created Oct 20, 2012
gemfile for dewey
View Gemfile
source 'http://rubygems.org'
gem 'rails', '3.1.0'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
# gem 'sqlite3'
gem 'pg'
gem 'json'
@jschank
jschank / gist:3889529
Created Oct 14, 2012
Text wrapping method
View gist:3889529
def wrap_text(text, width, indent_width)
raise ArgumentError.new("Width must be at least 1 character wide.") if width <= 1
raise ArgumentError.new("Wrapping width must be greater than the indent amount.") if width <= indent_width
width -= indent_width
lines = []
curline = nil
text.split.each do |word|
View build_ruby19.sh
#!/bin/sh
mkdir -p /usr/local/src && cd /usr/local/src
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p0.tar.bz2
tar -xjvf ruby-1.9.1-p0.tar.bz2
cd ruby-1.9.1-p0
./configure --prefix=/usr --program-suffix=19 --enable-shared
make && make install
You can’t perform that action at this time.