Skip to content

Instantly share code, notes, and snippets.

View knbknb's full-sized avatar
💭
🙅‍♀️💡💤😴🛌🤪🧔

Knut Behrends knbknb

💭
🙅‍♀️💡💤😴🛌🤪🧔
  • Nothing to see here
  • Potsdam, Germany
View GitHub Profile
@yoavniran
yoavniran / ultimate-ut-cheat-sheet.md
Last active March 21, 2026 02:30
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai, Sinon, and Jest
@andland
andland / 00Time_Slicing_README.md
Last active January 1, 2017 13:43
Time Stack and Time Slicing

See this link for an introduction on time stacking and time slicing.

time_slice.R requires the number of pixels wide or tall the image is to be a multiple of the number of images in your timelapse.

time_slice_v2.R attempts to get around this. Some images will contribute more pixels per slice than others. This is done by making the first x% of the images cover the first x% of the pixels (with appropriate rounding). It does not deal with number of images being greater than the height or width of the images in pixels. Version 2 will probably work better for you.

For example, if the images are 150 pixels wide and your timelapse has 100 images, time_slice.R will make the first image have a slice which is 51 pixels wide. The remaining 99 images will get slices which are 1 pixel wide. time_slice_v2.R will alternate between 1 pixel per i

@shriphani
shriphani / gist:8675874
Last active June 24, 2023 02:45
Racket code for the little schemer
#lang racket
;; Code for the little schemer
(define (atom? x)
(and (not (pair? x))
(not (null? x))))
(define (lat? l)
(cond ((null? l) #t)
@NoxArt
NoxArt / restore-menu-scroll.php
Last active March 18, 2025 09:08
AdminerRestoreMenuScroll plugin for Adminer
<?php
/**
* Remembers and restores scrollbar position of side menu
*
* Changes (2025-03-18):
* - Added nonce()
* - Changed load event binding
*
* @author Jiří @NoxArt Petruželka
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
@willurd
willurd / web-servers.md
Last active March 25, 2026 23:39
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
anonymous
anonymous / gist:4379918
Created December 26, 2012 11:56
Count of repositories in GitHub Archive by language as calculated using Faunus. See http://hortonworks.com/blog/big-graph-data-on-hortonworks-data-platform/ for details.
Apex 308
Arc 29
Assembly 1312
Augeas 19
AutoHotkey 329
D 1667
DCPU-16 Assembly 2
Dart 575
Delphi 974
Erlang 5503