View ansiplay
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
#!/usr/bin/env fish | |
# always wanted Ansible to be --check by default. | |
# Well, through the magic of arg munging, it can be! | |
# add `--check --diff` to all commands, unless it ends | |
# with GO | |
# E.g., | |
# ansiplay playbooks/foo.yml # --check and --diff added | |
# ansiplay playbooks/foo.yml GO # GO removed and playbook ran fo' realz |
View cdr
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
# Defined in /home/yanick/.config/fish/functions/cdr.fish @ line 1 | |
function cdr --description 'cd to the repo root' | |
set -l repo_dir ( perl -MPath::Tiny \ | |
-E'$x = path(".")->absolute; while(1){ exit say $x if $x->child(".git")->is_dir; exit if $x eq "/"; $x = $x->parent }' ) | |
if [ $repo_dir != "" ] | |
cd $repo_dir | |
else | |
echo "not in a git repo" |
View n
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
#!/usr/bin/env fish | |
set manager npm | |
if test -f pnpm-lock.yaml | |
set manager pnpm | |
else if test -f yarn.lock | |
set manager yarn | |
end |
View git-cm
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
#!/usr/bin/env perl | |
use 5.30.0; | |
use List::MoreUtils qw/ first_index /; | |
my $index = first_index { $_ eq '--' } @ARGV; | |
$index = 0 if $index== -1; |
View gist:35a6a2b5e1c818bba6a86bc3cfb05fc8
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
use App::Dothe::DSL; | |
use Path::Tiny::Glob pathglob => { all => 1 }; | |
task feeds => ( | |
deps => [qw/ entries summary /], | |
generates => [ map { './static/feed.'.$_ } qw/ atom json rss /], | |
sources => './static/entries.json', | |
cmds => './scripts/gen_feed.js' | |
); |
View test_mw.ts
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
type MWFixtures = Partial<{ | |
dispatch: Function; | |
getState: Function; | |
next: Function; | |
action: object; | |
}>; | |
function mw_fixtures(fixtures: MWFixtures) { | |
return fp.defaults({ | |
dispatch: jest.fn(), |
View genesis_public_key
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
0483c791e5461a4d897984590d33ff52e1d6d2f5c8b9e02bd4a092dc07dc0ad42aacb8c314b08c637bf9ac24a492f4137c80e5c1bc3a031fb7dc9d8090c07a6884 |
View gist:a7db7c1906c820443c18bed331c0e0b0
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
# To JavaScript and Back: Transfixing Tales of Transglotting Thefts (in Toronto) | |
Last year, Yanick took a deep dive into the JavaScript ecosystem and avidly drank | |
from the framework firehose. As part of the journey to understanding, he was | |
caught uttering "I wonder what that would look like in Perl..." a few times. | |
In this talk, we'll visit the result of this clash between learning and | |
hubris. We'll touch | |
[Redux](http://redux.js.org/)/[Pollux](https://metacpan.org/release/Pollux), | |
[MobX](https://mobx.js.org/)/[MoobX](https://metacpan.org/release/MoobX), and might even |
View mcpan.pl
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
#!/usr/bin/env perl | |
=usage | |
mcpan moosex | |
=cut | |
use 5.20.0; |
View 0_reuse_code.js
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
NewerOlder