Skip to content

Instantly share code, notes, and snippets.

Avatar

Jussi Räsänen jrasanen

View GitHub Profile
@jrasanen
jrasanen / main.lua
Created Jul 17, 2020 — forked from randrews/main.lua
Example code for nice-feeling player movement in Love
View main.lua
require 'point'
function love.load()
math.randomseed(os.time())
love.physics.setMeter(32)
love.graphics.setBackgroundColor(64, 120, 64)
world = love.physics.newWorld(0, 0)
crates = { makeCrate(world, 5, 5),
makeCrate(world, 5, 6) }
@jrasanen
jrasanen / layout.kbd.json
Created Nov 20, 2018 — forked from mmynsted/layout.kbd.json
Untitled Keyboard Layout
View layout.kbd.json
[
[
"Esc",
"F1",
"F2",
"F3",
"F4",
"F5",
"F6",
"F7",
@jrasanen
jrasanen / docker-destroy-all.sh
Created Apr 24, 2017 — forked from JeffBelback/docker-destroy-all.sh
Destroy all Docker Containers and Images
View docker-destroy-all.sh
#!/bin/bash
# Stop all containers
docker stop $(docker ps -a -q)
# Delete all containers
docker rm $(docker ps -a -q)
# Delete all images
docker rmi $(docker images -q)
@jrasanen
jrasanen / promise-all.clj
Created Apr 21, 2017 — forked from abarnash/promise-all.clj
Clojure implementation of all(promises).then(...) pattern from JavaScript
View promise-all.clj
(defn getPromiseFn
[aPromise]
(fn [num] (Thread/sleep 10000)
(deliver aPromise (str num " done"))))
(def proms [(promise) (promise) (promise)])
(def promFns (map getPromiseFn proms))
(future (map deref proms))
(future (map promFn (range 0 (count proms))))
@jrasanen
jrasanen / .vimrc
Created Jan 27, 2017 — forked from simonista/.vimrc
A basic .vimrc file that will serve as a good template on which to build.
View .vimrc
" Don't try to be vi compatible
set nocompatible
" Helps force plugins to load correctly when it is turned back on below
filetype off
" TODO: Load plugins here (pathogen or vundle)
" Turn on syntax highlighting
syntax on
@jrasanen
jrasanen / TestPayment.py
Last active Aug 28, 2015 — forked from aydiv/TestPayment.py
Paypal Adaptive Payments - Python sample for parallel payment
View TestPayment.py
import urllib
import urlparse
import collections
import httplib
def TestPayment():
#Set our headers
headers = {
'X-PAYPAL-SECURITY-USERID': 'jb-us-seller_api1.paypal.com',
'X-PAYPAL-SECURITY-PASSWORD': 'WX4WTU3S8MY44S7F',
@jrasanen
jrasanen / 0_reuse_code.js
Created Jul 16, 2014
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console