Map | Action |
---|---|
<F1> | Causes Netrw to issue help |
<cr> | Netrw will enter the directory or read the file |
<del> | Netrw will attempt to remove the file/directory |
- | Makes Netrw go up one directory |
a | Toggles between normal display, hiding (suppress display of files matching g:netrw_list_hide) showing (display only files which match g:netrw_list_hide) |
c | Make browsing directory the current directory |
C | Setting the editing window |
d | Make a directory |
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 zsh | |
set -ex | |
INPUT_FILE_PATH=${INPUT:a} | |
INPUT_DIR=${INPUT:a:h} | |
INPUT_EXT=${INPUT:e} | |
REVERSE_FILE_PATH="${INPUT_DIR}/reverse.${INPUT_EXT}" | |
FORWARD_FILE_PATH="${INPUT_DIR}/forward.${INPUT_EXT}" |
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
[ | |
{ | |
"netflix_collection_number": 1, | |
"netflix_episode_number": 1, | |
"title": "If I Were You", | |
"series_number": 285, | |
"season": 11, | |
"season_number": 28, | |
"air_date": "2007-01-24" | |
}, |
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
foo() { | |
echo "This is foo()" | |
} | |
bar=foo | |
bar | |
# --> zsh: command not found: bar |
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
from itertools import combinations | |
UP = [[0,0,1,0,1,1, | |
1,1,1,1,0,1], | |
[1,0,1,0,1,0, | |
0,1,1,0,1,1]] | |
DOWN = [[0,1,1,0,0,1, | |
1,1,1,1,0,1], | |
[1,0,1,0,1,0, | |
0,1,0,0,0,1]] |
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
#!/bin/sh | |
# | |
# To enable this hook, place this file at: | |
# <repo-base-dir>/.git/hooks/pre-commit | |
printf "Updating submodules to origin master..." >&2 | |
git submodule update --rebase --remote | |
STATUS=$? | |
if [ $STATUS -eq 0 ]; then | |
echo "done" >&2 |
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 python2 | |
from base64 import b32encode | |
from uuid import uuid4 | |
from sys import stdout | |
stdout.write(b32encode(uuid4().bytes)[:-6]) | |
if stdout.isatty(): | |
stdout.write('\n') |
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 sh | |
# Download 4chan images to the current directory. | |
# | |
# example: fourget http://boards.4chan.org/int/thread/48964967 | |
# | |
# requires httpie to be installed. | |
# The MIT License (MIT) | |
# |
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
class MeteredSession(requests.Session): | |
""" | |
Creates a session where response downloads are shown graphically on the | |
terminal with `click.progressbar` meters. This session adds a hook to | |
responses that will attach 2 meter methods, described below. | |
To use these meter methods on a response obj `resp`, call | |
* `resp.iter_content_metered(chunk_size, label='\t' + resp.url)` | |
* `resp.consume_content_metered(chunk_size, label='\t' + resp.url)` |
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
from operator import mul | |
from functools import reduce | |
from itertools import permutations | |
def factorial(n): | |
return reduce(mul, range(1,n+1), 1) | |
def word_index(word): | |
index = 1 |