This is a guide that I put together which is primarily aimed at Steam Deck enthusiasts and developers. I will be updating this over time as I think of more things to put in here.
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/sh | |
cage -- bash -c 'wlr-randr --output X11-1 --custom-mode 1280x800; sleep 1; sudo /usr/local/bin/waydroid-helper & waydroid show-full-ui' |
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 | |
# /home/root/monitor_wlan0_ip.sh | |
iface=wlan0 | |
get_dbus_iface() { | |
dbus-send --system --dest=fi.w1.wpa_supplicant1 --print-reply=literal \ | |
/fi/w1/wpa_supplicant1 \ | |
fi.w1.wpa_supplicant1.GetInterface \ | |
"string:$iface" \ | |
| sed 's/^ *//g' |
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
brew install pandoc | |
brew tap homebrew/cask | |
brew install --cask basictex | |
eval "$(/usr/libexec/path_helper)" | |
# Update $PATH to include `/usr/local/texlive/2022basic/bin/universal-darwin` | |
sudo tlmgr update --self | |
sudo tlmgr install texliveonfly | |
sudo tlmgr install xelatex | |
sudo tlmgr install adjustbox | |
sudo tlmgr install tcolorbox |
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 itertools | |
import torch | |
from torchtext.experimental.datasets.translation import DATASETS, TranslationDataset | |
from torchtext.vocab import build_vocab_from_iterator | |
from torchtext.experimental.functional import ( | |
vocab_func, | |
totensor, | |
sequential_transforms, | |
) | |
from torchtext.data.utils import get_tokenizer |
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 torch | |
from torch import LongTensor | |
from torch.nn import Embedding, LSTM | |
from torch.autograd import Variable | |
from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence | |
## We want to run LSTM on a batch of 3 character sequences ['long_str', 'tiny', 'medium'] | |
# | |
# Step 1: Construct Vocabulary | |
# Step 2: Load indexed data (list of instances, where each instance is list of character indices) |
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
pkg upgrade | |
# Install runtime deps | |
pkg install python libzmq libcrypt | |
# Add build deps | |
pkg install python-dev libzmq-dev libcrypt-dev clang | |
pip3 install -U pip | |
pip3 install pyzmq --install-option="--zmq=/usr/lib" | |
pip3 install jupyter |
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 root@10.11.99.1
- 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.
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/sh | |
# Reset Parallels Desktop's trial and generate a casual email address to register a new user | |
rm /private/var/root/Library/Preferences/com.parallels.desktop.plist /Library/Preferences/Parallels/licenses.xml | |
jot -w pdu%d@gmail.com -r 1 |
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
# coding: utf-8 | |
from objc_util import * | |
import threading | |
NSBundle = ObjCClass('NSBundle') | |
LocalAuthentication = NSBundle.bundleWithPath_('/System/Library/Frameworks/LocalAuthentication.framework') | |
LocalAuthentication.load() | |
LAContext = ObjCClass('LAContext') | |
# authenticate() will raise one of these exceptions when authentication |
NewerOlder