Skip to content

Instantly share code, notes, and snippets.

View sido's full-sized avatar

Sido van Gennip sido

View GitHub Profile
@sido
sido / index.html
Created June 17, 2011 18:28
Flashcard UI: Part 1
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>ui.Flashcard</title>
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/pepper-grinder/jquery-ui.css">
<link rel="stylesheet" href="ui.flashcard.css">
<style>
body { font-family: sans-serif; }
#myFlashcard { margin: 2em auto; }
@sido
sido / index.html
Created June 19, 2011 15:23
Flashcard UI: Part 2
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>ui.Flashcard</title>
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/pepper-grinder/jquery-ui.css">
<link rel="stylesheet" href="ui.flashcard.css">
<style>
body { font-family: sans-serif; }
#myFlashcard { margin: 2em auto; }
@sido
sido / Untitled.html
Created July 20, 2011 09:45
Basic HTML5 template
<!DOCTYPE html>
<html class="no-js" lang="en">
<head>
<meta charset="utf-8">
<title>Untitled</title>
<script src="//cdnjs.cloudflare.com/ajax/libs/modernizr/2.0.6/modernizr.min.js"></script>
<script>window.Modernizr || document.write('<script src="/lib/modernizr.custom.57692.js"><\/script>')</script>
</head>
<body>
@sido
sido / node-mongodb-native.example.js
Created August 30, 2011 22:23
Simple MongoDB Query in NodeJS using node-mongodb-native vs. node-mongoskin
var Db = require('../lib/mongodb').Db,
Connection = require('../lib/mongodb').Connection,
Server = require('../lib/mongodb').Server;
var host = 'localhost';
var port = Connection.DEFAULT_PORT;
var db = new Db('example', new Server(host, port, {}), {native_parser:true});
db.open(function(err, db) {
db.collection('docs', function(err, collection) {
@sido
sido / impress.html
Created January 2, 2012 16:43
Impress.js: notation example
<div class="step slide" data-x="1000" data-y="-1500">
<q>Would you like to <strong>impress your audience</strong> with <strong>stunning visualization</strong> of your talk?</q>
</div>
<div id="title" class="step" data-x="0" data-y="0" data-scale="4">
<span class="try">then you should try</span>
<h1>impress.js<sup>*</sup></h1>
<span class="footnote"><sup>*</sup> no rhyme intended</span>
</div>
@sido
sido / knabpal.php
Last active December 15, 2015 09:49
A little script I wrote to import my PayPal transactions into Knab.nl. It ain't pretty, but it works. The account can't be an email address like PayPal uses, so I replaced it with a number. Also the account wil be recognized as ABN, not PayPal.
#!/usr/local/bin/php
<?php
print "Convert Paypal export to Knab readable import\n";
$account = '000000001'; // Can't be an email address
$dataIn = file_get_contents('Downloaden.csv');
$data = array();
$dataOut = "";
foreach (explode("\n", $dataIn) as $row) {