Skip to content

Instantly share code, notes, and snippets.

@haschek
haschek / .jshintrc
Created May 4, 2012 16:08
JSHint Configuration, Strict Edition
{
// --------------------------------------------------------------------
// JSHint Configuration, Strict Edition
// --------------------------------------------------------------------
//
// This is a options template for [JSHint][1], using [JSHint example][2]
// and [Ory Band's example][3] as basis and setting config values to
// be most strict:
//
// * set all enforcing options to true
@andreyvit
andreyvit / tmux.md
Created June 13, 2012 03:41
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@johnjohndoe
johnjohndoe / pre-commit.sh
Created November 6, 2012 11:48
Git pre-commit hook to add a new line at the end of a file and remove trailing whitespaces
#!/bin/sh
#
# An example hook script to verify what is about to be committed.
# Called by "git commit" with no arguments. The hook should
# exit with non-zero status after issuing an appropriate message if
# it wants to stop the commit.
#
# Usage:
# Remove the .sh file extension when you put the script in your hooks folder!
#
import scala.reflect.runtime.universe._
import scala.reflect.runtime.{currentMirror => cm}
trait Base {
def companion: MetaBase = {
val classSymbol = cm.classSymbol(getClass)
val moduleSymbol = classSymbol.companionSymbol.asModule
val moduleMirror = cm.reflectModule(moduleSymbol)
moduleMirror.instance.asInstanceOf[MetaBase]
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC
"-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>homebrew.mxcl.bitlbee</string>
<key>ProgramArguments</key>
<array>
@choppsv1
choppsv1 / tmux-24.diff
Last active December 21, 2018 15:25
True color (24-bit) terminal support for tmux-1.9a and tmux-2.0
This diff is a modified version of a diff written by Arnis Lapsa.
[ The original can be found here: https://gist.github.com/ArnisL/6156593 ]
This diff adds support to tmux for 24-bit color CSI SRG sequences. This
allows terminal based programs that take advantage of it (e.g., vim or
emacs with https://gist.github.com/choppsv1/73d51cedd3e8ec72e1c1 patch)
to display 16 million colors while running in tmux.
The primary change I made was to support ":" as a delimeter as well
@choppsv1
choppsv1 / emacs-24.4-24bit.diff
Last active September 14, 2017 16:23
True color (24-bit) terminal support for Emacs 24.4
This diff is a modified version of a diff written by Rüdiger Sonderfeld.
The original diff can be found here:
http://emacs.1067599.n5.nabble.com/RFC-Add-tty-True-Color-support-tt299962.html
To enable the feature one must set one of 2 environment variables either
ITERM_24BIT or KONSOLE_DBUS_SESSION. The former will enable ITU T.416 mode, the
latter will use semi-colon seperators used by other terminals (and also
supported by iterm development branch).
@joech4n
joech4n / Configure Postfix for Gmail SMTP in Mac OSX.md
Last active June 19, 2024 11:37 — forked from larrybotha/readme.markdown
Configure Postfix for Gmail SMTP in Mac OSX
@htp
htp / curl-websocket.sh
Last active May 14, 2024 21:24
Test a WebSocket using curl.
curl --include \
--no-buffer \
--header "Connection: Upgrade" \
--header "Upgrade: websocket" \
--header "Host: example.com:80" \
--header "Origin: http://example.com:80" \
--header "Sec-WebSocket-Key: SGVsbG8sIHdvcmxkIQ==" \
--header "Sec-WebSocket-Version: 13" \
http://example.com:80/
@rougier
rougier / material-colors.el
Created July 31, 2020 17:54
Emacs year calendar in a dedicated frame
;; Material colors from https://material.io/design/color/
(defconst levels
(list "L50" "L100" "L200" "L300" "L400"
"L500" "L600" "L700" "L800" "L900"
"A100" "A200" "A400" "A700"))
(defconst red
(list "#FFEBEE" "#FFCDD2" "#EF9A9A" "#E57373" "#EF5350"
"#F44336" "#E53935" "#D32F2F" "#C62828" "#B71C1C"
"#FF8A80" "#FF5252" "#FF1744" "#D50000"))