Skip to content

Instantly share code, notes, and snippets.

Michael Kohl citizen428

Block or report user

Report or block citizen428

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 gist:230801a96e9231ad44566083e0c4f6cd
### Keybase proof
I hereby claim:
* I am citizen428 on github.
* I am citizen428 ( on keybase.
* I have a public key whose fingerprint is E183 E826 AAA2 71D9 A25E B8E9 EF16 E5E6 87B2 A218
To claim this, I am signing this object:
citizen428 / even_numbers_sequence.swift
Last active Jan 13, 2016
Swift sequences, generators etc
View even_numbers_sequence.swift
class EvenNumbers: CollectionType {
let startIndex : Int
let endIndex : Int
init(start: Int, end: Int) {
self.startIndex = start
self.endIndex = end
convenience init() {
citizen428 / array_extension.swift
Last active Jan 26, 2016
Turning Swift into Ruby
View array_extension.swift
import Foundation
extension Array {
func each(task: (Element) -> ()) {
for element in self {
func eachWithIndex(start: Int? = nil, task: (Int, Element) -> ()) {
View gist:7316f3e11004eabbd269
# A colorful, friendly, multiline theme with some handy features.
# Based on the 'giddie' theme by Paul Gideon Dann.
# Authors:
# Michael Kohl <>
# Paul Gideon Dann <>
# Sorin Ionescu <>
# Features:
citizen428 / fizzbuzz.ex
Last active Aug 29, 2015
Elixir FizzBuzz server
View fizzbuzz.ex
defmodule FizzBuzz do
def compute do
receive do
n -> IO.puts compute(n)
defp compute(n) do
case {rem(n, 3), rem(n, 5)} do
View gist:9916f225a60cdb4dcbc8
loop { print ">> " ; puts("=> %s" % eval(gets.chomp!)) }
citizen428 / userContent.css
Created Jan 16, 2014
Get rid of the "Inland" section of Place contents of this file in `chrome/userContent.css` inside your Firefox profile directory.
View userContent.css
@-moz-document url( {
div.section.inland { display: none }
citizen428 / with.rb
Created Mar 21, 2012
ActionScript-like "with" for Ruby, result of SO discussion
View with.rb
module Kernel
def with(obj, &block)
obj.instance_eval &block
citizen428 / forth.rb
Last active Sep 29, 2015
View forth.rb
class Proc
def prim_call(stack)
forth_arity = self.arity - 1
if stack.size < forth_arity
puts "Buffer underrun"
return stack.clear
forth_arity > 0 ?, *stack.pop(forth_arity)) : call(stack)
citizen428 / ruby_github.rb
Created Nov 23, 2011
Create an Atom feed from the new Ruby repos page
View ruby_github.rb
require 'open-uri'
require 'nokogiri'
require 'builder'
html = open("")
doc = Nokogiri::HTML.parse(html)
atom = => STDOUT, :indent => 2)
atom.feed "xmlns" => "" do
You can’t perform that action at this time.