Skip to content

Instantly share code, notes, and snippets.

View jakobw's full-sized avatar
🦆

Jakob Warkotsch jakobw

🦆
View GitHub Profile
// Vuex eats second argument of jQuery.Deferred promise when devtools are enabled
const store = new Vuex.Store({
actions: {
test: () => {
return $.Deferred((defer) => {
window.setTimeout(() => {
defer.reject('foo', 'bar')
}, 500)
})
require 'github_api'
github = Github.new
prs = github.pull_requests(user: 'Zarel', repo: 'Pokemon-Showdown')
.all(state: 'all', per_page: 100)
.auto_paginate(true)
known_authors = []
rejected = 0
multi_pr = []
-- Probeklausur 1.2
data N = Zero | S (N) deriving (Show) -- natürliche Zahlen
data Z = Z (N,N) deriving (Show) -- ganze Zahlen
class Rechnen a where
add :: a -> a -> a
instance Rechnen N where
add m Zero = m
@jakobw
jakobw / add.hs
Created November 13, 2011 19:51
Get two numbers from stdin, add them and show the result.
main = do
putStrLn "Enter a number"
n1 <- getLine
putStrLn $ n1 ++ " + ?"
n2 <- getLine
putStrLn $ n1 ++ " + " ++ n2 ++ " = " ++ (show $ read n1 + read n2)