Skip to content

Instantly share code, notes, and snippets.

@lislis
lislis / .travis.yml
Created September 5, 2018 14:08
Headless Chrome Config on Travis with Rails and Capybara
# [...]
addons:
chrome: stable
@lislis
lislis / spezi.zsh-theme
Last active April 14, 2017 15:18
zsh theme
# ZSH Theme - Preview: http://gyazo.com/8becc8a7ed5ab54a0262a470555c3eed.png
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
local user='%{$fg[blue]%}%n%{$reset_color%}'
local host='@$fg[magenta]%}%m%{$reset_color%}:%{$reset_color%}'
local current_dir='%{$fg[yellow]%}%~%{$reset_color%}'
local git_branch='$(git_prompt_info)%{$reset_color%}'
PROMPT="╭─${user}${host}${current_dir} ${git_branch}
@lislis
lislis / anti-pong.clj
Created June 17, 2016 14:39
A rough prototype for anti-pong for Quil in Clojure
(ns quil-games.core
(:require [quil.core :refer :all]
[quil.middleware :as m])
(:gen-class))
(defn setup []
{:score 0
:ball
{:x 0
:y 60
@lislis
lislis / offlineCtx.js
Last active September 15, 2015 21:28
analyse a sound file and play it after that
offlineCtx = new OfflineAudioContext(1, 44100 * 60, 44100);
offlineAnalyser = offlineCtx.createAnalyser();
offlineAnalyser.fftSize = 4096;
offlineProcessor = offlineCtx.createScriptProcessor(16384, 1, 1);
offlineProcessor.connect(offlineCtx.destination);
offlineSource = offlineCtx.createBufferSource();
@lislis
lislis / functions.php
Created October 21, 2014 11:15
Get a list of all blogs in a Wordpress mulisite installation with an image for each blog
/*
* This is kind of a hack but it gets the job done.
* Paste this in your theme's functions.php
* The function returns an array of all blogs in the multisite network.
* For the image I make use of Wordpress' custom header functionality
*/
function get_all_blogs() {
$blogs = array();
$count = 0;