This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-------- | |
-- Window switching | |
-------- | |
screenWindowFilters = {} | |
previewSequences = {} | |
log = hs.logger.new("WAT") | |
hs.window.animationDuration = 0 | |
function resetPreviewSequences() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
----------- | |
-- Zoom PTT in Hammerspoon | |
----------- | |
function withZoomApp(fun) | |
local app = hs.application.get("zoom.us") | |
if (app ~= nil) then | |
fun(app) | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function withZoomApp(fun) | |
local app = hs.application.get("zoom.us") | |
if (app ~= nil) then | |
fun(app) | |
end | |
end | |
function pttDown() | |
withZoomApp(function(app) | |
hs.eventtap.event.newKeyEvent("space", true):post(app) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def shout(msg) | |
puts "#{msg}!!!" | |
end | |
def shout_twice(msg) | |
puts "#{msg}!!! #{msg}!!!" | |
end | |
def louden(msg) | |
"#{msg}!!!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set -e | |
if [[ ! -d ~/vim ]]; then | |
echo "Downloading vim..." | |
mkdir ~/vim | |
cd ~/vim | |
# Staically linked vim version compiled from https://github.com/ericpruitt/static-vim | |
# Compiled on Jul 20 2017 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"cards":[{"artist":"Richard Thomas","cmc":5,"colorIdentity":["U"],"colors":["Blue"],"flavor":"These spirits of the air are winsome and wild, and cannot be truly contained. Only marginally intelligent, they often substitute whimsy for strategy, delighting in mischief and mayhem.","id":"926234c2fe8863f49220a878346c4c5ca79b6046","imageName":"air elemental","layout":"normal","manaCost":"{3}{U}{U}","mciNumber":"47","multiverseid":94,"name":"Air Elemental","power":"4","rarity":"Uncommon","subtypes":["Elemental"],"text":"Flying","toughness":"4","type":"Creature — Elemental","types":["Creature"]},{"artist":"Mark Poole","cmc":1,"colorIdentity":["U"],"colors":["Blue"],"id":"aa74b7dc3b30b2e7559598f983543755e226811d","imageName":"ancestral recall","layout":"normal","manaCost":"{U}","mciNumber":"48","multiverseid":95,"name":"Ancestral Recall","rarity":"Rare","reserved":true,"text":"Target player draws three cards.","type":"Instant","types":["Instant"]},{"artist":"Douglas Shuler","cmc":4,"colorIdentity":["U"],"colors":["Bl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
arr = (1..10).to_a | |
enumerator = arr.select.each {|i| puts "AT #{i}"; i > 2} | |
puts "ANY? #{enumerator.any?}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A Change in the Weather by Andrew Plotkin (1995, 1st Place tie): http://ifdb.tads.org/viewgame?id=00wlim27k5d1hmf2 | |
Photopia by Adam Cadre (1998, 1st Place): http://ifdb.tads.org/viewgame?id=ju778uv5xaswnlpl | |
For a Change by Dan Schmidt (1999, 2nd Place): http://ifdb.tads.org/viewgame?id=t61i5akczyblx2zd | |
All Roads by Jon Inglod (2001, 1st Place): http://ifdb.tads.org/viewgame?id=4s7uohdncurgqb0h | |
Floatpoint by Emily Short (2006, 1st Place): http://ifdb.tads.org/viewgame?id=01efmfsk4r79mtks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Order allow,deny | |
Require valid-user | |
Satisfy any | |
AuthType Basic | |
AuthName "Protected Login" | |
AuthUserFile /path/to/.htpasswd | |
SetEnvIf Cookie "(/api/.(.*))$" is_sample_cookie=yes | |
Allow from env=is_sample_cookie |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function mystery() { | |
var timeout = setTimeout(function() { console.log("foo"); }, 1); | |
reallySlowFunction(); | |
clearTimeout(timeout); | |
} |
NewerOlder