brew install multimarkdown
brew install fswatch
echo '#!/bin/bash
multimarkdown --full "file.md" > /tmp/file.html && open -g /tmp/file.html' > /tmp/rebuild.sh && chmod +x /tmp/rebuild.sh; fswatch -o "file.md" | xargs -n1 /tmp/rebuild.sh
This file contains hidden or 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
package MasterableThing; | |
use Moose; | |
has 'something' => (is => 'rw', isa => 'Str'); | |
has 'master' => (is => 'rw'); | |
sub do_this_thing { | |
my $themaster = $_[0]->master; | |
my $theoriginal = $_[0]; |
This file contains hidden or 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
--- VimDebug.vim 2013-05-25 22:57:31.000000000 +0000 | |
+++ ~/.vim/plugin/VimDebug.vim 2015-12-04 20:46:43.000000000 +0000 | |
@@ -8,10 +8,15 @@ | |
if (!has('perl') || !has('signs')) | |
echo "VimDebug requires +perl and +signs" | |
finish | |
endif | |
+perl eval 'use Vim::Debug'; $r=$@?0:1; VIM::DoCommand("let foundVimDebug = $r"); | |
+if (foundVimDebug == 0) |
This file contains hidden or 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
# export_dayone_entries.py | |
# Aleksandr Pasechnik | |
# | |
# This script goes through the Day One journal and exports each of the entries | |
# to a new markdown file in the `exportdir` directory. The `exportdir` | |
# directory is deleted and recreated each time the script is run, so best set | |
# it to something temporary (a subdirectory on the Desktop, for example). | |
# Photos are copied into the export directory too, with the same basename as | |
# the exported entries. The timestamp, location, weather, and tags are appended | |
# to the end of the file, if they are available. The script also sticks a '#' |
This file contains hidden or 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
#!/usr/bin/env python3 | |
# licence: ¯\_(ツ)_/¯ | |
import requests | |
s = requests.Session() | |
d = { | |
'client_id': 'client_id', | |
'client_secret': 'client_secret', |
This file contains hidden or 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
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
sub mkNode { | |
my ($data) = @_; | |
my $node = `echo '{"Data": "$data"}' | ipfs object put`; | |
die "failed to create node" if $?; |
This file contains hidden or 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
( (1 or 2 or 3) and (not (4 and (5 or 6 ) ) ) ) | |
{ | |
"operator": "AND", | |
"subsections": [ | |
{ | |
"operator": "OR", | |
"entities": [ 1, 2, 3 ] | |
}, | |
{ |
This file contains hidden or 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
pingcheck = hs.menubar.new() | |
function pingUpdate() | |
pingcheck:setTitle('⥌'..pingcheck:title()) | |
local p = hs.network.ping('example.com', 3) | |
hs.timer.doAfter(4, function() | |
p:cancel() | |
local avg = p:summary():match('%/(%d+)%.%d+%/') | |
if avg == nil or avg == '0' then | |
pingcheck:setTitle('∞') | |
else |
I hereby claim:
- I am apiarian on github.
- I am apiarian (https://keybase.io/apiarian) on keybase.
- I have a public key ASDql2jnKyQKDqepzcSb1x9Rxxw-PGFC0ajwDZsfzZPX3wo
To claim this, I am signing this object: