Skip to content

Instantly share code, notes, and snippets.

View Mobilpadde's full-sized avatar
😻

Mads B. Cordes Mobilpadde

😻
View GitHub Profile
@jed
jed / LICENSE.txt
Created May 20, 2011 13:27 — forked from 140bytes/LICENSE.txt
generate random UUIDs
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Jed Schmidt <http://jed.is>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@lsauer
lsauer / gist:1221325
Created September 16, 2011 06:09
Javascript word frequency counter - word histogramm
//l.sauer 2011, public domain
//returns a hash table with the word as index and frequency as value; good for svg / canvas -plotting or other experiments
//[:punct:] Punctuation symbols . , " ' ? ! ; : # $ % & ( ) * + - / < > = @ [ ] \ ^ _ { } | ~
var wordcnt = function(id){
var hist = {}, words = document.getElementById(id).innerText.split(/[\s*\.*\,\;\+?\#\|:\-\/\\\[\]\(\)\{\}$%&0-9*]/)
for( i in words)
if(words[i].length >1 )
hist[words[i]] ? hist[words[i]]+=1 : hist[words[i]]=1;
return hist;
};
@gre
gre / easing.js
Last active October 30, 2024 16:49
Simple Easing Functions in Javascript - see https://github.com/gre/bezier-easing
/*
* This work is free. You can redistribute it and/or modify it under the
* terms of the Do What The Fuck You Want To Public License, Version 2,
* as published by Sam Hocevar. See the COPYING file for more details.
*/
/*
* Easing Functions - inspired from http://gizma.com/easing/
* only considering the t value for the range [0, 1] => [0, 1]
*/
EasingFunctions = {
@LeCoupa
LeCoupa / nodejs-cheatsheet.js
Last active November 4, 2024 04:19
Complete Node.js CheatSheet --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
/* *******************************************************************************************
* THE UPDATED VERSION IS AVAILABLE AT
* https://github.com/LeCoupa/awesome-cheatsheets
* ******************************************************************************************* */
// 0. Synopsis.
// http://nodejs.org/api/synopsis.html
@emilsoman
emilsoman / tmux-layout.md
Created August 31, 2014 21:49
Easy tmux layouts for tmuxinator

Tmux layouts with tmuxinator

Finally this time, I'm sold on tmux after I used tmuxinator to configure tmux layouts. The default layout didn't work for me, I wanted more control on the split panes. Here's how you can fine tune your tmux layout:

  1. Add this to your ~/.tmux.conf -> set -g mouse-resize-pane on
  2. Start tmux, split panes, resize panes with mouse to your liking
  3. On your shell, run tmux list-windows to list active tmux windows and their layouts
  4. Copy paste the layout in tmuxinator project file
@RichardMarks
RichardMarks / haxe-auto-installer.sh
Created September 3, 2014 10:46
Installing Haxe, OpenFL, HaxeFlixel on Ubuntu
#!/bin/sh
HAXE_VERSION=3.1.3
HAXE_VERSION_COMMA=3,1,3
NEKO_VERSION=2.0.0
if [ "$1" = "y" -o "$1" = "-y" ]; then
@shiffman
shiffman / recordinglist.md
Last active September 13, 2019 15:53
A list of ideas for #CodingRainbow Video topics: https://www.youtube.com/user/shiffman
@nitoyon
nitoyon / rgb.go
Created January 1, 2016 16:08
Generate Animation GIF with Golang
package main
import (
"fmt"
"image"
"image/color"
"image/gif"
"math"
"os"
)
@noeldiaz
noeldiaz / README.md
Created September 21, 2016 02:16
Clone repository and cd into the directory

Installation

You can add the gcd script to your local bin path or you can add the followin snippet to your bash .profile or zsh .zshrc file.

function gcd {
  REPO=$1
  CLONEPATH=$2

 if [ -z $CLONEPATH ]; then
@0xjac
0xjac / private_fork.md
Last active November 16, 2024 18:10
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare [email protected]:usi-systems/easytrace.git