Skip to content

Instantly share code, notes, and snippets.

Avatar
🖖
42

David Jack Wange Olrik davidolrik

🖖
42
View GitHub Profile
@davidolrik
davidolrik / init.lua
Created Apr 11, 2017 — forked from ttscoff/init.lua
Hammerspoon config examples for hyper key
View init.lua
-- 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)
@davidolrik
davidolrik / find-webproxy.pl
Last active Dec 23, 2015
Find the current active http proxy on OS X.
View find-webproxy.pl
#!/usr/bin/env perl
use strict;
use warnings;
my $networksetup = `networksetup -listnetworkserviceorder`;
my @network_services = map { $_ =~ s/\(\d+\)\s+//; $_ } # 3. Remove (\d+) from begining of line
grep { /^\(\d+\)/ } # 2. Only look at lines starting with (\d+)
split(/\n/,$networksetup); # 1. Split into lines
You can’t perform that action at this time.