- C-a == Ctrl-a
- M-a == Alt-a
:q close
:w write/saves
:wa[!] write/save all windows [force]
:wq write/save and close
C:\cygwin64\bin\mintty.exe /usr/bin/zsh -
. Make it the defaut shell.start C:\cygwin64\bin\mintty.exe /usr/bin/zsh -
@font-face { | |
font-family: 'Source Sans Pro Semibold'; | |
src: url("chrome-extension://dgmanlpmmkibanfdgjocnabmcaclkmod/fonts/SourceSansPro-Semibold.ttf"); | |
} | |
@font-face { | |
font-family: 'Source Sans Pro Bold'; | |
src: url("chrome-extension://dgmanlpmmkibanfdgjocnabmcaclkmod/fonts/SourceSansPro-Bold.ttf"); | |
} | |
@font-face { | |
font-family: 'Source Sans Pro Light'; |
### sqlmd | |
# Bash function for outputting SQLite results in Markdown-friendly table | |
### Dependency: | |
# csvlook can be found here: http://csvkit.readthedocs.io/en/540/scripts/csvlook.html | |
### USAGE | |
# $ sqlmd "SELECT name, age FROM people;" optional_db_name_argument.sqlite | |
### OUTPUT |
Alternative bindings for the 540p using pactl and i3 - Keyboard
# set laptop display to lower res - thats better
exec xrandr --output eDP1 --mode 1920x1080
# set Numlock to on at login time
exec --no-startup-id numlockx on
# start pidgin on launch
adb help // List all comands | |
== Adb Server | |
adb kill-server | |
adb start-server | |
== Adb Reboot | |
adb reboot | |
adb reboot recovery | |
adb reboot-bootloader |
This is one way of managing your user profile declaratively.
Alternatives include:
nix-env
-based environment, installed using nix-env -ir
rather than nix-env --set
. LnL has an overlay which shows a way of doing this.$HOME
Note that this is incompatible with regular imperative use of nix-env
, e.g. nix-env -iA nixpkgs.hello
. It has the advantage of allowing the installation of multiple outputs of the same package much better than nix-env
's builtin profile builder does.
Network namespaces are an important component of containerization in Linux. A network namespace (netns) allows a running process to see different network interfaces, routes, and firewall rules from the rest of the system. There are a number of use cases for network namespaces, such as running multiple servers, testing/staging environments and providing isolation of services.
We begin by creating a generic systemd service for creating a named network namespace. I add the following to /usr/lib/systemd/system/netns@.service
. In systemd, the @
mean the service takes a parameter which is passed to the unit via %i
. E.g, we can run sudo systemctl start netns@webserver.service
.
import { useEffect, useRef } from 'react'; | |
function useDelayedEffect(effect, changingStateVars = [], delay = 1000) { | |
const mutable = useRef(); | |
const delayedEffect = () => { | |
mutable.current = setTimeout(effect, delay); | |
return () => { | |
clearTimeout(mutable.current); |
/** | |
* cloudflare-worker-youtube-dl.js | |
* Get direct links to YouTube videos using Cloudflare Workers. | |
* | |
* Usage: | |
* GET /?v=dQw4w9WgXcQ | |
* -> Returns a JSON list of supported formats | |
* | |
* GET /?v=dQw4w9WgXcQ&f=251 | |
* -> Returns a stream of the specified format ID |