View init.lua
hotkey.bind({"command", "option"}, 'down', function() | |
local resizing = hs.hotkey.modal.new() | |
local activeWindow = hs.window.focusedWindow() | |
local backdrop = hs.drawing.rectangle( hs.screen.mainScreen():frame() ) | |
:setFillColor({ red=0, green=0, blue=0, alpha=0.2 }) | |
local resizeIndicator = hs.drawing.rectangle({ x=0, y=0, w=0, h=0 }) | |
:setFillColor({ red=1, green=1, blue=1, alpha=0.3 }) | |
:setStrokeWidth(1) | |
:setStroke(1) | |
:setStrokeColor({ red=1, green=1, blue=1, alpha=0.5 }) |
View gist:0efae66992050d75c665
### Keybase proof | |
I hereby claim: | |
* I am keithamus on github. | |
* I am keithamus (https://keybase.io/keithamus) on keybase. | |
* I have a public key whose fingerprint is 887F 7DC5 A858 9D7D 8653 D0B7 FCCC E6EC AC15 16FC | |
To claim this, I am signing this object: |
View 1.html
<div itemscope itemtype="http://schema.org/Thing"></div> |
View collect-headers.js
var app = require('express')(), | |
fs = require('fs'); | |
var headers = []; | |
app.get('/', function (req, res) { | |
headers.push(req.headers); | |
res.json(req.headers); | |
}); | |
setInterval(function () { | |
fs.writeFileSync('headers.json', JSON.stringify(headers)); | |
}, 10000); |
View hexandrgb.js
function hex2rgb(hex) { | |
var int = parseInt(hex.replace(/^#/, '').replace(/^#/, '').replace(/^([\da-f])([\da-f])([\da-f])$/, '$1$1$2$2$3$3'), 16); | |
return { | |
r: (int >> 16) & 255, | |
g: int >> 8 & 255, | |
b: int & 255 | |
}; | |
} |
View example_code.js
define([], function () { | |
return function HypotheticalHelperMethod() { | |
doSomeOtherStuff(); | |
} | |
}); | |
define(["helperMethod"], function (helperMethod) { |
View commit-msg
#!/bin/sh | |
message=`sed '/^#/,$d' $1` | |
firstLine=`echo "$message" | awk 'NR>1{exit};1'` | |
exitCode=0 | |
txtred=$(tput setaf 1) # Red | |
txtrst=$(tput sgr0) # Text reset | |
if [[ "`echo "$firstLine" | awk '{print length()}'`" -gt 49 ]]; then | |
echo "${txtred}[POLICY] Ensure first line in your commit message is no longer than 50 characters${txtrst}" |
View Nano Git Commit Syntax highlighting
syntax "gitcommit" "COMMIT_EDITMSG$" | |
color white "#.*" | |
color green "#.(modified|deleted).*" | |
color yellow start="# Changes.*" end="# Changed.*" | |
color cyan start="# Untracked.*" end="diff" | |
color cyan start="# Untracked.*" end="$$" | |
color brightred "^deleted file mode .*" | |
color brightgreen "^\+.*" | |
color brightred "^-.*" | |
color brightyellow "^(diff|index|---|\+\+\+).*" |