Skip to content

Instantly share code, notes, and snippets.

@koreno
koreno / README.md
Last active April 1, 2020 10:44
'rebaser' improves on 'git rebase -i' by adding information per commit regarding which files it touched.

Prebase

git-prebase improves on 'git rebase -i' by adding information per commit regarding which files it touched.

  • Each file gets an alpha-numeric identifier at a particular column, a list of which appears below the commit list. (The identifiers wrap around after the 62nd file)
  • Commits can be moved up and down safely (without conflicts) as long as their columns don't clash (they did not touch the same file).

Installation

Add the executable to your path and git will automatically expose it as

@stramit
stramit / CustomEvents.cs
Created September 4, 2014 06:16
Sending Custom Events via the EvenSystem
using System;
using System.Collections.Generic;
using UnityEngine.Events;
// interface you implement in your MB to receive events
public interface ICustomHandler : IEventSystemHandler
{
void OnCustomCode(CustomEventData eventData);
}
anonymous
anonymous / dabblet.css
Created May 17, 2013 01:15
HTML5 / CSS3 Circle with Partial Border
/**
* HTML5 / CSS3 Circle with Partial Border
* http://stackoverflow.com/q/13059190/1397351
*/
html {
display: table;
width: 100%;
height: 100%;
background: #222 url(http://cdn1.sbnation.com/entry_photo_images/8217543/20130310-625A3566VERGE_large_verge_medium_landscape.jpg) center;
@jhebb
jhebb / grid.less
Last active December 17, 2015 10:39
Semantic alternative to Chris's excellent grid demo at CSS-Tricks : http://css-tricks.com/dont-overthink-it-grids/
/*********************************************
SIMPLE GRID
A very basic semantic Less grid system using padding.
Based on Chris Coyier's excellent grid demo at CSS-Tricks : http://css-tricks.com/dont-overthink-it-grids/
********************************************/
// Default grid padding, change to override
@gridpad: 2em;
anonymous
anonymous / dabblet.css
Created May 17, 2013 01:06
Circular Tooltip (SO)
/**
* Circular Tooltip (SO)
* http://stackoverflow.com/q/13132864/1397351
*/
* { margin: 0; padding: 0; }
body {
overflow: hidden;
background: url(http://theearlcarlson.com/experiments/amTooltip/img/bg.jpg);
}
/* generic styles for button & circular menu */
@bhoung
bhoung / trueskill_ex2.r
Last active September 30, 2021 02:51
Example 2. Running trueskill algorithm on a tennis tournament.
# This second example runs Trueskill on a tennis tournament, the Australian Open.
# Note that actual computation is commented out as it takes about ~40 seconds to
# update skill ratings over 127 matches.
library(trueskill)
# Data format of ausopen2012 is: Player, Opponent, Margin, Round, WRank, LRank
data("ausopen2012")
# create match_id in order to reshape