Skip to content

Instantly share code, notes, and snippets.

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

Knut Behrends knbknb

💭
🙅‍♀️💡💤😴🛌🤪🧔
View GitHub Profile
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
@willurd
willurd / web-servers.md
Last active May 25, 2024 13:16
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
@NoxArt
NoxArt / restore-menu-scroll.php
Last active November 29, 2023 12:38
AdminerRestoreMenuScroll plugin for Adminer
<?php
/** Remembers and restores scollbar position of side menu
* @author Jiří @NoxArt Petruželka, www.noxart.cz
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
*/
class AdminerRestoreMenuScroll {
protected $script;
@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)
@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

@yoavniran
yoavniran / ultimate-ut-cheat-sheet.md
Last active May 26, 2024 19:09
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai, Sinon, and Jest
@derhuerst
derhuerst / _.md
Last active April 9, 2024 11:06
List of HAFAS API Endpoints
@HarmJ0y
HarmJ0y / PowerView-2.0-tricks.ps1
Last active May 13, 2024 06:52
PowerView-2.0 tips and tricks
# NOTE: the most updated version of PowerView (http://www.harmj0y.net/blog/powershell/make-powerview-great-again/)
# has an updated tricks Gist at https://gist.github.com/HarmJ0y/184f9822b195c52dd50c379ed3117993
# get all the groups a user is effectively a member of, 'recursing up'
Get-NetGroup -UserName <USER>
# get all the effective members of a group, 'recursing down'
Get-NetGroupMember -GoupName <GROUP> -Recurse
# get the effective set of users who can administer a server
@joepie91
joepie91 / vpn.md
Last active May 20, 2024 03:37
Don't use VPN services.

Don't use VPN services.

No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.

Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.

  • A Russian translation of this article can be found here, contributed by Timur Demin.
  • A Turkish translation can be found here, contributed by agyild.
  • There's also this article about VPN services, which is honestly better written (and has more cat pictures!) than my article.
@wch
wch / rowwise.Rmd
Last active February 28, 2023 03:35
---
title: "Applying a function over rows of a data frame"
author: "Winston Chang"
output: html_document
editor_options:
chunk_output_type: console
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(collapse = TRUE, comment = "#>")