map J nextTab
map K previousTab
map z passNextKey " great for youtube, e.g., zf -> fullscreen
map <c-p> togglePinTab " How often do you really print webpages with c-p anyway?
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
#!/usr/bin/env bash | |
# This is a cheap way to do like macOS say command in Linux | |
# Put this in /usr/local/bin/say or somewhere on your $PATH | |
# Install flite ("Festival Lite") with: | |
# sudo apt install -y flite | |
# Adjust speaking rate/speed/wpm with --setf duration_stretch=MULTIPLIER_OF_NORMAL_SPEED: |
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
{ | |
"version": "2.0.101", | |
"settings": { | |
"autofocusevents": "ads,annotations,cinema,size,boost,loop,speed,filters", | |
"autopausevideos": true, | |
"backgroundcolor": "#000000", | |
"backgroundopacity": 85, | |
"blur": 0, | |
"brightness": 100, | |
"cinemamode": false, |
The following is adapted from original instructions at https://www.expressvpn.com/support/vpn-setup/app-for-linux/#install
- Log in from browser: https://www.expressvpn.com/sign-in
- Copy activation code to clipboard
- Download the
.deb
installation file - Go to terminal
cd ~/Downloads
sudo dpkg -i [installer file]
expressvpn activate
- Paste activation code from clipboard when asked. There is no visual feedback, so be careful to paste only once asked and press enter if need be.
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
!file ~/.Xmodmap | |
clear control | |
clear mod1 | |
clear mod4 | |
keycode 37 = Super_L | |
! left Ctrl becomes Super | |
keycode 64 = Control_L |
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
-- SQLite | |
-- Test: sqlite3 -header -echo -column :memory: < % | |
create table t1 ( | |
bk int | |
, valid_from datetime default CURRENT_TIMESTAMP | |
, valid_to datetime default '9999-12-31 23:59:59' | |
, a1 varchar(20) | |
, primary key (bk, valid_from) | |
); |
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
SQLite version 3.29.0 2019-07-10 17:32:03 | |
Enter ".help" for usage hints. | |
sqlite> -- SQLite | |
sqlite> -- Test: sqlite :memory: < % | |
sqlite> | |
sqlite> create table t1 ( | |
...> bk int primary key | |
...> , a1 varchar(20) | |
...> ); | |
sqlite> |
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
class UtilLinux < Formula | |
desc "Collection of Linux utilities" | |
homepage "https://github.com/karelzak/util-linux" | |
url "https://www.kernel.org/pub/linux/utils/util-linux/v2.34/util-linux-2.34.tar.xz" | |
sha256 "743f9d0c7252b6db246b659c1e1ce0bd45d8d4508b4dfa427bbb4a3e9b9f62b5" | |
bottle do | |
cellar :any | |
sha256 "3fb25026099ea42c1c54b80cad6bbdf9bf09b0e0e967ca4690698d0d2d379483" => :mojave | |
sha256 "7d7e421229cbf8b0ac5fbe1f0ffc7d18a3e0ce9dc09090bd346f676111cc2bb7" => :high_sierra |
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
# If user pipes to less, or hits Ctrl-C, etc, avoid the annoying | |
# `Broken pipe @ io_writev - <STDOUT> (Errno::EPIPE)` error. | |
# Source: https://stackoverflow.com/questions/1807355/broken-pipe-errnoepipe/18082444#18082444 | |
ARGF.each do |line| | |
line.chomp! | |
begin | |
puts line | |
rescue Errno::EPIPE | |
exit |
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
def mysql_int_type(int_range) | |
case | |
when (0..255) .cover?(int_range) then "tinyint unsigned" | |
when (0..65535) .cover?(int_range) then "smallint unsigned" | |
when (0..16777215) .cover?(int_range) then "mediumint unsigned" | |
when (0..4294967295) .cover?(int_range) then "int unsigned" | |
when (0..18446744073709551615) .cover?(int_range) then "bigint unsigned" | |
when ( -128..127) .cover?(int_range) then "tinyint" | |
when ( -32768..32767) .cover?(int_range) then "smallint" | |
when ( -8388608..8388607) .cover?(int_range) then "mediumint" |