Skip to content

Instantly share code, notes, and snippets.

Sebastian Wittenkamp bitops

Block or report user

Report or block bitops

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 PipeForward.swift
// pipe-forward operator
precedencegroup ForwardApplication {
associativity: left
infix operator |>: ForwardApplication
func |> <A, B>(a: A, f: (A) -> B) -> B {
return f(a)

Rich Hickey on becoming a better developer

Rich Hickey • 3 years ago

Sorry, I have to disagree with the entire premise here.

A wide variety of experiences might lead to well-roundedness, but not to greatness, nor even goodness. By constantly switching from one thing to another you are always reaching above your comfort zone, yes, but doing so by resetting your skill and knowledge level to zero.

Mastery comes from a combination of at least several of the following:

bitops /
Created Mar 13, 2018
Simple blue-green cloud foundry deploy script
echo "Building app."
mvn clean package
echo "Pushing Blue."
cf push seb -f manifest.yml
echo "Pushing Green."
cf push seb-green -f manifest.yml
bitops / Program.cs
Created Aug 3, 2017
Simple XmlDocument example with Couchbase on .Net
View Program.cs
using System;
using System.IO;
using System.Threading;
using System.Xml;
using Couchbase;
namespace ConsoleApp1
class Program
bitops / TestStuff.ps1
Created Aug 1, 2017
My first PowerShell script. Oh yeah.
View TestStuff.ps1
Param (
echo "Foo: $Foo"
bitops / profile.ps1
Created Aug 1, 2017
Sebastian's Powershell profile
View profile.ps1
# need to have this all the time in $USER_HOME\Documents\WindowsPowerShell\profile.ps1
Set-PSReadLineKeyHandler -Key Tab -Function Complete
Set-PSReadLineOption -EditMode Emacs
bitops / recursive_block.rb
Created Jul 31, 2016
a recursive function in ruby that takes a block
View recursive_block.rb
def foo(n, &block)
if n > 0
foo(n - 1, &block)
bitops / selection.rb
Created Jul 28, 2016
selection sort :)
View selection.rb
def selection_sort(array, start_idx=0)
smallest_value, swap_idx = nil, nil
for idx in start_idx..(array.size - 1)
val = array[idx]
if smallest_value.nil? || smallest_value > val
smallest_value = val
swap_idx = idx
bitops / bubble.rb
Created Jul 27, 2016
bubble sort :)
View bubble.rb
def bubble_sort(array)
@swap_needed = false
array.each_with_index do |val, idx|
a = val
b = array[idx + 1]
if !b.nil? && a > b
@swap_needed = true
array[idx] = b
array[idx + 1] = a
$ git init .
Initialized empty Git repository in /Users/swittnekamp/tmp/git_index/.git/
$ cat <<EOF > foo.txt
Some example content
$ git add foo.txt
$ git status
You can’t perform that action at this time.