Skip to content

Instantly share code, notes, and snippets.

View jbilcke's full-sized avatar
🦫
building something

Julian Bilcke jbilcke

🦫
building something
View GitHub Profile
// paste in your console
speechSynthesis.onvoiceschanged = function() {
var msg = new SpeechSynthesisUtterance();
msg.voice = this.getVoices().filter(v => v.name == 'Cellos')[0];
msg.text = Object.keys(window).join(' ');
this.speak(msg);
};
@celoyd
celoyd / hi8-anim-howto.md
Last active August 1, 2022 15:37
A way to make Himawari-8 animations

Himawari-8 animation tutorial

Here’s how to make animations like this one. It requires intermediate Unix command-line knowledge, to install some tools and to debug if they don’t work. You’ll need these utilities:

  • curl (or you can translate to wget)
  • convert and montage, part of ImageMagick
  • ffmpeg, plus whatever codecs
  • parallel, for iteration that’s nicer than shell for loops or xargs
  • run everything in zsh for leading 0s in numerical ranges to work
@loic-moriame
loic-moriame / index.js
Created July 24, 2015 09:23
node.js + sequelize + sqlite
'use strict';
var Sequelize = require('sequelize');
var sequelize = new Sequelize('mainDB', null, null, {
dialect: "sqlite",
storage: './test.sqlite',
});
sequelize
// We define a logical rule Augmentable that transform Int -> Long and Float -> Double
// at the type level with a dependent type.
// Then we want to abstract over arity and ensure that an "augment" transformation
// is defined for every type of a HList.
import shapeless._
// Dependent type T -> S (S depends on T)
trait Augmentable[T] {
type S
@jrudolph
jrudolph / .gitignore
Created November 15, 2012 09:31
json-lenses example
/.idea/
/project/boot/
/project/plugins/project
target/
lib_managed/
src_managed/
test-output/
*.iml
@helena
helena / akka-cluster-config
Created November 3, 2012 17:39
Here are some of the more interesting configurable cluster properties
# Here are some of the more interesting configurable cluster properties
# that enable you to maintain health of your system
# Note: The provider to use
akka.actor.provider = akka.cluster.ClusterActorRefProvider
akka.cluster {
# if after this duration no heartbeat has been received, you have a problem
failure-detector.acceptable-heartbeat-pause = 5s
@travisbrown
travisbrown / tower-of-hanoi.scala
Created September 23, 2012 17:44
Solving the Tower of Hanoi at the type level
/**
* Type-level Tower of Hanoi
* by Travis Brown
*
* Note: not optimal, and probably won't work for some valid inputs.
* Tested with Scala 2.9.2 and Shapeless 1.2.3.
*/
import shapeless._, Nat._
@kagemusha
kagemusha / gist:3215681
Created July 31, 2012 09:57
UMongo "com.mongodb.MongoException: can't find a master" when try to connect
c. UMongo 1.2.1
In the server text field, change 'localhost' to '127.0.0.1' and it should work
@mavropalias
mavropalias / gist:3135341
Created July 18, 2012 09:55
Node.js Amazon Cloudformation template
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Description" : "Node.js server",
"Parameters" : {
"KeyName" : {
"Description" : "Name of an existing EC2 KeyPair to enable SSH access",
"Type" : "String"
},
ar http = require('http');
var fs = require('fs');
var util = require('util');
var fileCache;
var sendFile = function(conn, file) {
conn.writeHead(200, {"Content-Type": "text/html", "Content-Length": file.length});
conn.write(file);
conn.end();
}