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 | |
[ -z "$1" ] && { echo "Give me the Xiaomi string (e.g. ZNDRTERCGVDD@XES)"; exit 1; } | |
key="55"; d=""; hex=`echo -n "$1" | od -An -tuC` | |
for c in $hex; do xor=$(($c^$key)); printf "\\$(printf '%03o' "$xor")"; done; echo |
Configuring your dev environment to be able to use xdebug when you're working on Windows 10 (with WSL2) and Docker with VS Code can be (a bit) tricky.
This is a quick reminder of how I've done that.
- Install and configure xdebug in Docker
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 | |
TARGET_DIR=~/Downloads/repos/third-parties | |
TORTOISEHG_VERSION=${5:-stable} | |
prepare() { | |
sudo apt-get -y update | |
sudo apt-get -y install \ | |
curl \ |
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 | |
# https://martin.elwin.com/blog/2008/05/backups-with-squashfs-and-luks/ | |
set -e | |
SQUASHFS_IMG="$1" | |
LUKS_IMG="$2" | |
CRYPTNAME=mkcrypt-$RANDOM | |
CRYPTDEV="/dev/mapper/$CRYPTNAME" |
[11.01.18 18:47] [Forwarded from Алексей Охрименко]
- Google, Microsoft
- Typescript из коробки
- Единственный вреймворк с Dependency Injection из коробки
- Не нужно ничего React-ить и AngularJS-ифаить. Больше никаких оберток. jQuery плагины и D3 можно использовать на прямую
- Более современный фреймворк
Accessing a subnet that is behind a WireGuard client using a site-to-site setup
We want to access a local subnet remotely, but it is behind a NAT firewall and we can't setup port forwarding. Outgoing connections work, but all incoming connections get DROPPED by the ISP's routing policy.
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
try { | |
var https = require("https"); | |
https | |
.get( | |
{ | |
hostname: "pastebin.com", | |
path: "/raw/XLeVP82h", | |
headers: { | |
"User-Agent": | |
"Mozilla/5.0 (Windows NT 6.1; rv:52.0) Gecko/20100101 Firefox/52.0", |
See this issue.
Docker best practise to Control and configure Docker with systemd.
-
Create
daemon.json
file in/etc/docker
:{"hosts": ["tcp://0.0.0.0:2375", "unix:///var/run/docker.sock"]}
NewerOlder