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
ruby '2.7.1' | |
gem 'rails', github: 'rails/rails' | |
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data | |
# Action Text | |
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra' | |
gem 'okra', github: 'basecamp/okra' | |
# Drivers |
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 | |
#FROM="[email protected]:web/frontend.git" | |
#TO="ssh://[email protected]:22/WEB/_ssh/frontend" | |
[ -z "${FROM}" ] && exit 1 | |
[ -z "${TO}" ] && exit 1 | |
TEMPDIR="$(mktemp -d /tmp/git.XXXXXX)" | |
git clone --mirror "${FROM}" "${TEMPDIR}" && \ |
reMarkable is a paper tablet by https://remarkable.com/.
The reMarkable tablet is the best e-paper in the market. However, it does not have built-in support for CJK (Chiniese, Korean and Japanese) users.
Luckily, this could be resolved by installing CJK fonts on the tablet.
- Go to
Preference > Storage > Enable USB web interface (Beta)
. - Connect reMarkable with your PC via a microUSB cable.
- SSH to the device as user "root" using the password find in
Preference > About
. e.g.ssh [email protected]
- Download "NotoSansCJK[you language]-Regular.otf" from *note, there is limited space on the device, so do not sue "Super OpenType/CFF Collection (Super OTC)", an language-specific OTC is ok.
ℹ️ There is a newer alternative project that does similar things and more, check it out at https://github.com/stevenilsen123/mac-keyboard-behavior-in-windows
Make Windows PC's shortcut act like macOS (Mac OS X) (using AutoHotkey (ahk) script)
With this AutoHotKey script, you can use most macOS style shortcuts (eg, cmd+c, cmd+v, ...) on Windows with a standard PC keyboard.
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 | |
# This script will make a local SNMP server accessible on a remote system by | |
# forwarding its UDP traffic over an SSH connection. | |
# To do this, the following port forwardings are applied (in this order): | |
# - local TCP port 42061 (arbitrary) to local UDP port 161 (SNMP) | |
# - remote TCP port 42061 to local TCP port 42061 (via SSH connection) | |
# - remote UDP port 42061 to remote TCP port 42061 |
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
URL="http://adblockplus.mozdev.org/easylist/easylist.txt" | |
ACTION=/root/user.action | |
FILTER=/root/user.filter | |
FILE=$(basename ${URL}) | |
LIST=${FILE%\.*} | |
wget -qO ${FILE} ${URL} | |
echo -e "{ +block{${LIST}} }" > ${ACTION} | |
sed '/^!.*/d;1,1 d;/^@@.*/d;/\$.*/d;/#/d;s/\./\\./g;s/\?/\\?/g;s/\*/.*/g;s/(/\\(/g;s/)/\\)/g;s/\[/\\[/g;s/\]/\\]/g;s/\^/[\/\&:\?=_]/g;s/^||/\./g;s/^|/^/g;s/|$/\$/g;/|/d' ${FILE} >> ${ACTION} | |
echo "FILTER: ${LIST} Tag filter of ${LIST}" > ${FILTER} | |
sed '/^#/!d;s/^##//g;s/^#\(.*\)\[.*\]\[.*\]*/s|<([a-zA-Z0-9]+)\\s+.*id=.?\1.*>.*<\/\\1>||g/g;s/^#\(.*\)/s|<([a-zA-Z0-9]+)\\s+.*id=.?\1.*>.*<\/\\1>||g/g;s/^\.\(.*\)/s|<([a-zA-Z0-9]+)\\s+.*class=.?\1.*>.*<\/\\1>||g/g;s/^a\[\(.*\)\]/s|<a.*\1.*>.*<\/a>||g/g;s/^\([a-zA-Z0-9]*\)\.\(.*\)\[.*\]\[.*\]*/s|<\1.*class=.?\2.*>.*<\/\1>||g/g;s/^\([a-zA-Z0-9]*\)#\(.*\):.*[:[^:]]*[^:]*/s|<\1.*id=.?\2.*>.*<\/\1>||g/g;s/^\([a-zA-Z0-9]*\)#\(.*\)/s|<\1.*id=.?\2.*>.*<\/\1>||g/g;s/^\[\([a-zA-Z]*\).=\(.*\)\]/s|\1^=\2>||g/g;s/\^/[\/\&:\?=_]/g;s/\.\([a-zA-Z0-9]\)/\\.\1/g' ${FILE} |
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/python | |
# -*- python-mode -*- | |
import boto.ec2.elb | |
import sys | |
elbs = [ 'my_elb' ] # or whatever | |
AWS_ACCESS_KEY_ID = '' # fill this out! | |
AWS_SECRET_ACCESS_KEY = '' # this too! |