Short (72 chars or less) summary
More detailed explanatory text. Wrap it to 72 characters. The blank
line separating the summary from the body is critical (unless you omit
the body entirely).
Write your commit message in the imperative: "Fix bug" and not "Fixed
bug" or "Fixes bug." This convention matches up with commit messages
π»
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
LATEST_VERSION=$(curl -s https://api.github.com/repos/so-fancy/diff-so-fancy/releases/latest | grep -Po '"tag_name": "v\K[^"]*') | |
sudo curl -L -o /usr/local/bin/diff-so-fancy "https://github.com/so-fancy/diff-so-fancy/releases/download/v${LATEST_VERSION}/diff-so-fancy" | |
sudo chmod +x /usr/local/bin/diff-so-fancy |
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
# v1.3.0 - Lutris Installer for Legends of Runeterra Openbeta (forked from league of legends installer) | |
# | |
# [REQUIREMENTS] | |
# - Nvidia driver 430 or newer + vulkan | |
# - Wine 64bit, delete ~/.wine folder after intallation of wine64 from wine32 | |
# - Archlinux, Manjaro, Ubuntu 18+ or Fedora | |
# | |
# [INSTALLATION] | |
# Install "Lutris" on linux https://lutris.net/ | |
# Download this file and rename to: lutris-legends-of-runeterra-openbeta.yml |
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
# based on http://blogs.pdmlab.com/alexander.zeitler/articles/installing-and-configuring-p4merge-for-git-on-ubuntu/ | |
$ cd ~/Downloads | |
$ wget https://cdist2.perforce.com/perforce/r18.2/bin.linux26x86_64/p4v.tgz | |
$ tar zxvf p4v.tgz | |
$ sudo mkdir /opt/p4v |
The following are examples of the four types rate limiters discussed in the accompanying blog post. In the examples below I've used pseudocode-like Ruby, so if you're unfamiliar with Ruby you should be able to easily translate this approach to other languages. Complete examples in Ruby are also provided later in this gist.
In most cases you'll want all these examples to be classes, but I've used simple functions here to keep the code samples brief.
This uses a basic token bucket algorithm and relies on the fact that Redis scripts execute atomically. No other operations can run between fetching the count and writing the new count.
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
# migrating from https://github.com/robbyrussell/oh-my-zsh/blob/master/plugins/git/git.plugin.zsh | |
# Aliases | |
alias g='git' | |
#compdef g=git | |
alias gst='git status' | |
#compdef _git gst=git-status | |
alias gd='git diff' | |
#compdef _git gd=git-diff | |
alias gdc='git diff --cached' |