- What will the system do?
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
MOST_RECENT_LEN=20 | |
function chpwd { | |
if [[ $(ls --format=vertical -w ${COLUMNS} | wc -l) -lt $((LINES - 1)) ]] { | |
ls | |
} else { | |
echo $(find . -maxdepth 1 | wc -l) entries. \ | |
Showing $MOST_RECENT_LEN most recent \(ctime\) | |
ls -c | head -n$MOST_RECENT_LEN | |
} | |
} |
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
# Add auto-completion and a stored history file of commands to vanilla Python | |
# interactive interpreter. Requires Python 2.0+, readline. Autocomplete is | |
# bound to the Esc key by default (you can change it - see readline docs). | |
# | |
# Store the file in $HOME/.pystartup, and set an environment variable to point | |
# to it: "export PYTHONSTARTUP=$HOME/.pystartup" in bash. | |
def init(): | |
init_tab_completion() |
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
#!/bin/bash | |
set -o nounset | |
set -o errexit | |
TMP_DIR_PREFIX='pst' | |
TMP_FILE_SUFFIX='.html' | |
TMPDIR=${TMPDIR:-'/tmp'} | |
DEFAULT_LEXER='python' # change this to your preferred language | |
DEFAULT_PORT='8000' |
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
BEGIN:VCALENDAR | |
BEGIN:VEVENT | |
DTSTART;VALUE=DATE:20000728 | |
DTEND;VALUE=DATE:20000728 | |
RRULE:FREQ=YEARLY;INTERVAL=1;BYMONTH=7;BYDAY=-1FR | |
DESCRIPTION:https://en.wikipedia.org/wiki/System_Administrator_Appreciation_Day http://sysadminday.com/ | |
LOCATION: | |
SEQUENCE:0 | |
STATUS:CONFIRMED | |
SUMMARY:SysAdmin Appreciation Day |
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
BEGIN:VCALENDAR | |
BEGIN:VEVENT | |
DTSTART;VALUE=DATE:20020913 | |
DTEND;VALUE=DATE:20020913 | |
RRULE:FREQ=YEARLY;INTERVAL=1;BYYEARDAY=256 | |
DESCRIPTION:https://en.wikipedia.org/wiki/Programmers%27_Day | |
LOCATION: | |
SEQUENCE:0 | |
STATUS:CONFIRMED | |
SUMMARY:Programmers' Day |
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
# Copyright (c): Hilario J. Montoliu <hmontoliu@gmail.com> | |
# This program is free software; you can redistribute it and/or modify it | |
# under the terms of the GNU General Public License as published by the | |
# Free Software Foundation; either version 2 of the License, or (at your | |
# option) any later version. See http://www.gnu.org/copyleft/gpl.html for | |
# the full text of the license. | |
# Taken from http://stackoverflow.com/questions/6928946/mysterious-lineno-in-bash-trap-err | |
set -o errtrace |
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
# 50-character subject line | |
# | |
# 72-character wrapped longer description. This should answer: | |
# | |
# * Why was this change necessary? | |
# * How does it address the problem? | |
# * Are there any side effects? | |
# |
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
~/% curl --version | |
curl 7.51.0 (x86_64-apple-darwin16.0) libcurl/7.51.0 SecureTransport zlib/1.2.8 | |
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp | |
Features: AsynchDNS IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz UnixSockets | |
~/% curl -vvv -X DELETE -d '{ "some": "json" }' http://httpbin.org/delete | |
* Trying 23.22.14.18... | |
* TCP_NODELAY set | |
* Connected to httpbin.org (23.22.14.18) port 80 (#0) | |
> DELETE /delete HTTP/1.1 | |
> Host: httpbin.org |
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
from importlib import import_module | |
from sys import modules | |
from warnings import warn | |
from datetime import date, timedelta | |
from collections import namedtuple | |
class RenameHook: | |
def __init__(self, registry): | |
self.registry = registry |
OlderNewer