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
(setq package-enable-at-startup nil) | |
;; Now we need MELPA | |
(require 'package) | |
(setq package-archives | |
'(("MELPA" . "https://melpa.org/packages/") | |
("GNU ELPA" . "https://elpa.gnu.org/packages/"))) | |
(package-initialize) | |
(defvar bootstrap-version) |
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
#main-window[tabsintitlebar="true"]:not([extradragspace="true"]) #TabsToolbar > .toolbar-items { | |
opacity: 0; | |
pointer-events: none; | |
} | |
#main-window:not([tabsintitlebar="true"]) #TabsToolbar { | |
visibility: collapse !important; | |
} | |
#sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] #sidebar-header { | |
display: none; |
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
import pygit2 | |
def checkout_branch(path, branch_name): | |
repo = pygit2.Repository(path) | |
# If the branch isn't already in the local list, | |
# you have to create a ref for it to point at | |
# in order to avoid detached head state | |
if branch_name not in repo.branches.local: |
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
! The following 2 lines are what I use to display news.ycombinator.com | |
! Limit comments to 70 characters wide, making them easier to read | |
news.ycombinator.com##.comment:style(max-width: 70ch !important; overflow: hidden !important;) | |
! Invert the colours of the site, making a dark mode that I like | |
! `invert(95%)` does most of the work, | |
! but you can tweak the hue-rotate value to fine tune the colours | |
news.ycombinator.com##html:style(filter:invert(95%) hue-rotate(200deg); background: white) |
Copied from the readline documentation.
For MacOS, replace Ctrl
with Cmd
, and Meta
with Option
.
Shortcut | Comment |
---|---|
Ctrl +A |
Beginning of line |
Ctrl +B / ← |
Backward one character |
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
# A dotfile to turn iTerm2 tabs a different colour based on the command glob. | |
# Useful for marking different environments in different colours. | |
# Cargo-culted from multiple sources, apologies for not fully acknowledging them :( | |
# Edit the line that reads "if [[ "$1" =~ "^(login-helper) " ]]; then" and replace | |
# "login-helper" with whatever command you use to authenticate. Then modify the case | |
# statement to match your auth command's arguments. For example: you may use a script | |
# called "authsaml" to authenticate, and its arguments are dev, test, preprd, and prd. | |
# Change the colour function you call if you want to change tab colours. |
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
# Sample Nginx config with sane caching settings for modern web development | |
# | |
# Motivation: | |
# Modern web development often happens with developer tools open, e. g. the Chrome Dev Tools. | |
# These tools automatically deactivate all sorts of caching for you, so you always have a fresh | |
# and juicy version of your assets available. | |
# At some point, however, you want to show your work to testers, your boss or your client. | |
# After you implemented and deployed their feedback, they reload the testing page – and report | |
# the exact same issues as before! What happened? Of course, they did not have developer tools | |
# open, and of course, they did not empty their caches before navigating to your site. |
Random query recipes of JMESPath for the AWS CLI tools that I might have written or stumbled upon.
NewerOlder