Skip to content

Instantly share code, notes, and snippets.

View kitofr's full-sized avatar

Kristoffer Roupé kitofr

  • Stockholm, Sweden
View GitHub Profile
@kitofr
kitofr / scout-chipher.rb
Created November 19, 2019 20:39
A ruby implementation of the scout chipher
# | S | C | O | U | T |
# s | A | B | C | D | E |
# c | F | G | H | I | J |
# o | K | L | M | N | O |
# u | P | R | S | T | U |
# t | V | Y | Å | Ä | Ö |
def alphabet
{
'A': 'Ss', 'B': 'Cs', 'C': 'Os', 'D': 'Us', 'E': 'Ts',
@kitofr
kitofr / Main.elm
Last active September 7, 2017 09:27 — forked from anonymous/Main.elm
ELM Date and time pickers > https://ellie-app.com/4b3Mgc3dyQGa1/0
module Main exposing (..)
import Html exposing (Html, text, input, div, button, br)
import Html.Attributes as Attr exposing (type_, step, value)
import Html.Events exposing (onInput, onClick)
import Date exposing (Date)
import Task
dateInput : List (Html.Attribute msg) -> List (Html msg) -> Html msg
test =
describe "State machine"
[
test "[A,A,A] should be False" <|
\() ->
Expect.equal (decide [A, A, A]) False
, test "[A,A,A,A,B,B,A,A,A] should be True" <|
\() ->
Expect.equal (decide [A,A,A,A,B,B,A,A,A]) True
, test "[B,A,B,A,B,A] should be False" <|
@kitofr
kitofr / MITPlanck.md
Created April 25, 2017 06:19
Empty planck scaffold

MIT Layout

Name:

 ,-----------------------------------------------------------------------.
 |     |     |     |     |     |     |     |     |     |     |     |     |
 |-----------------------------------------------------------------------|
 |     |     |     |     |     |     |     |     |     |     |     |     |
 |-----------------------------------------------------------------------|
 | | | | | | | | | | | | |

Keybase proof

I hereby claim:

  • I am kitofr on github.
  • I am kitofr (https://keybase.io/kitofr) on keybase.
  • I have a public key ASDQ8PkOWBRCiPQhiDgUCuhcMr6LFb6j8aRR8gqnpQvQeAo

To claim this, I am signing this object:

@kitofr
kitofr / reset_homebrew_cask.sh
Created March 20, 2015 21:00
homebrew cask reset
brew untap caskroom/cask && brew update && brew cleanup --force -s && rm -rf "$(brew --cache)" && brew tap caskroom/cask
@kitofr
kitofr / Gemfile
Last active August 29, 2015 14:08
OSX extras
source "https://rubygems.org"
gem 'rake'
@kitofr
kitofr / kill_ruby.bat
Last active August 29, 2015 14:03
A simple script to kill off "hanging" ruby processes
ruby %~dp0kill_ruby_processes.rb
1) test convert (Hashish.Test)
** (ExUnit.ExpectationError)
expected: [project: [[[:id, "_Root"], [[:name, "<Root project>"], [[:href, "/guestAuth/app/rest/projects/id:_Root"]]]], [[[:id, "AmazonApiClient"], [[:name, "Amazon API client"], [[:href, "/guestAuth/app/rest/projects/id:AmazonApiClient"]]]]]]]
to be equal to (===): [project: [[id: "_Root", name: "<Root project>", href: "/guestAuth/app/rest/projects/id:_Root"], [id: "AmazonApiClient", name: "Amazon API client", href: "/guestAuth/app/rest/projects/id:AmazonApiClient"]]]
at test/tcbot_test.exs:15
@kitofr
kitofr / index.html
Created September 26, 2013 12:52
Plunker that "wroks" with file upload directive... this does *NOT* work on my machine, it causes >Error: InvalidStateError: DOM Exception 11 Error: An attempt was made to use an object that is not, or is no longer, usable.
<!DOCTYPE html>
<html ng-app="myApp">
<head>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.0.6/angular.min.js"></script>
<script src="script.js"></script>
</head>
<body>
<div ng-controller="MyCtrl">