Skip to content

Instantly share code, notes, and snippets.

@bunkat
bunkat / index.html
Last active September 29, 2024 02:37
Swimlane Chart using d3.js
<!--
The MIT License (MIT)
Copyright (c) 2013 [email protected]
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@tony4d
tony4d / p4merge4git.md
Created August 24, 2012 19:00
Setup p4merge as a visual diff and merge tool for git
@grej
grej / RankOrderCentroid.py
Created September 6, 2012 02:39
Rank order centroid implementation for Python
#-------------------------------------------------------------------------------
# Name: Rank Order Centroid
# Purpose: Generate rank order centroid weights
#
# Author: Greg Jennings
#
# Created: 5 Sep 2012
# Copyright: (c) Greg 2012
# Licence: MIT
#-------------------------------------------------------------------------------
@caldwell
caldwell / .gitconfig
Last active November 22, 2020 20:21
~/.gitconfig snippet for using Emacs ediff with git mergetool via emacsclient.
[merge]
tool = ediff
[mergetool "ediff"]
cmd = emacsclient -c -a \"\" --eval \"(ediff-merge-files-with-ancestor \\\"$LOCAL\\\" \\\"$REMOTE\\\" \\\"$BASE\\\" nil \\\"$MERGED\\\")\"
STATUS_CANCELLED = 'cancelled'
STATUS_NEW = 'new'
STATUS_PENDING = 'pending'
STATUS_PAYMENT_DUE = 'payment-due'
STATUS_PAYMENT_PENDING = 'payment-pending'
STATUS_PAID = 'paid'
NEGOTIABLE_STATUS_CHOICES = (
(STATUS_CANCELLED, 'Cancelled'), # Cancelled, duh
(STATUS_NEW, 'New'), # Default state of request
@miguelmota
miguelmota / README.md
Last active November 9, 2024 16:50
Multiple accounts with Mutt E-Mail Client (gmail example)

How to set up multiple accounts with Mutt E-mail Client

Thanks to this article by Christoph Berg

Instructions

Directories and files

~/
@pinge
pinge / ubuntu_14.04_macbook_pro_retina_15_inch_mid_2014.md
Last active March 10, 2021 03:05
How to install Ubuntu 14.04.1 LTS on a MacBook Pro Retina 15" Mid 2014 (11,3)
@mangreen
mangreen / Youtube Get Current Second Api Demo.
Last active August 26, 2021 02:04
Youtube Get Current Second Api Demo.
<!DOCTYPE html>
<html>
<body>
<!-- 1. The <iframe> (and video player) will replace this <div> tag. -->
<div id="player"></div>
<div>Current Time: <span id="time"></span></div>
<script>
// 2. This code loads the IFrame Player API code asynchronously.
var tag = document.createElement('script');
@weeksie
weeksie / copy-yank-lines.el
Last active August 29, 2015 14:18
Little hack for moving lines of text up and down.
(defun kill-current-line ()
"An abbreviated method for killing a whole line plus the newline terminal"
(kill-region (line-beginning-position) (+ (line-end-position) 1)))
(defun copy-current-line ()
"Similar to the above but copy the text rather than cut it"
(copy-region-as-kill (line-beginning-position) (+ (line-end-position) 1)))
(defun kill-yank (n)
(kill-current-line) ;grab current line of text