Skip to content

Instantly share code, notes, and snippets.

@ttscoff
ttscoff / init.lua
Last active January 9, 2024 23:44
Hammerspoon config examples for hyper key
-- A global variable for the Hyper Mode
k = hs.hotkey.modal.new({}, "F17")
-- Trigger existing hyper key shortcuts
k:bind({}, 'm', nil, function() hs.eventtap.keyStroke({"cmd","alt","shift","ctrl"}, 'm') end)
-- OR build your own
launch = function(appname)
@unbracketed
unbracketed / branch-fu.md
Created April 7, 2015 17:49
Moving commits between branches

Example: Moving up to a few commits to another branch

Branch A has commits (X,Y) that also need to be in Branch B. The cherry-pick operations should be done in the same chronological order that the commits appear in Branch A.

cherry-pick does support a range of commits, but if you have merge commits in that range, it gets really complicated

git checkout branch-B
git cherry-pick X
git cherry-pick Y
@JunichiIto
JunichiIto / alias_matchers.md
Last active April 16, 2024 16:18
List of alias matchers in RSpec 3

This list is based on aliases_spec.rb.

You can see also Module: RSpec::Matchers API.

matcher aliased to description
a_truthy_value be_truthy a truthy value
a_falsey_value be_falsey a falsey value
be_falsy be_falsey be falsy
a_falsy_value be_falsey a falsy value
@sztupy
sztupy / INSTALL.md
Last active April 4, 2018 07:49 — forked from namuol/INSTALL.md

rage-quit plugin for oh-my-zsh

based on rage-quit support for bash

HOW TO INSTALL

Put the files below inside ~/.oh-my-zsh/custom/plugins/fuck

Also chmod a+x the flip command.

@coreyhaines
coreyhaines / Applications
Last active December 21, 2015 05:39
Installing new computer
Chrome
Alfred
Dropbox
1Password
Sizeup
Twitter
Coconut Battery
Dash
XCode
Caffeine
@ferventcoder
ferventcoder / ReduceThatDB.sql
Created June 16, 2012 12:48
D to the B to the A - Reducing the size of a SQL Server database
/*
* Scripts to remove data you don't need here
*/
/*
* Now let's clean that DB up!
*/
DECLARE @DBName VarChar(25)
@AlexCuse
AlexCuse / DatabaseReCollatorMcJawn.sql
Created April 26, 2012 14:02
Recollate All SQL Server Columns
--desired collation for (var)char columns:
DECLARE @collationName VARCHAR(30)
SET @collationName = 'Latin1_General_CS_AI'
--build tables containing drop/create index queries
--http://www.sqlservercentral.com/scripts/Indexing/31652/
SELECT
REPLICATE(' ',4000) AS COLNAMES ,
OBJECT_NAME(I.ID) AS TABLENAME,
I.ID AS TABLEID,
@bentayloruk
bentayloruk / Promise<T>.cs
Created March 31, 2011 15:16
Promise a non-null IEnumerable in your method chains. Simplicity.
public static IEnumerable<T> Promise<T>(this IEnumerable<T> enumerable)
{
return enumerable ?? Enumerable.Empty<T>();
}