This file contains hidden or 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
# Usage | |
# | |
# 1. Install WSL https://aka.ms/wsl | |
# 2. Install distribution (Microsoft Store > Debian) https://www.microsoft.com/en-us/p/debian/9msvkqc78pk6 | |
# 3. Initialize WSL (start it, set username, etc) | |
# 4. Install SSH server | |
# | |
# ```bash | |
# sudo apt update && sudo apt install openssh-server -y | |
# ``` |
This file contains hidden or 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
# Start the SSH agent (not needed if desktop environment starts it) | |
SSH_ENV="$HOME/.ssh/agent" | |
function start_agent { | |
MASK=$(umask) | |
umask 0077 | |
/usr/bin/ssh-agent |sed 's/^echo/#echo/' >"${SSH_ENV}" | |
umask $MASK | |
. "${SSH_ENV}" >/dev/null | |
} |
This file contains hidden or 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
from subprocessing import Popen, PIPE | |
class run: | |
def __init__(self, cmd, stdin=None, ttl=None): | |
self.cmd, self.stdin, self.ttl = cmd, stdin, ttl | |
p = Popen(cmd, shell=True, stdin=PIPE, stdout=PIPE, stderr=PIPE) | |
self.stdout, self.stderr = p.communicate(stdin, ttl) | |
self.code = p.wait() |
This file contains hidden or 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
// 1. Add the following to your seed-rs project's src/lib.rs: | |
use web_sys::console; | |
const ENABLE_CONSOLE_DEBUG: bool = true; | |
const ENABLE_CONSOLE_LOG: bool = true; | |
const ENABLE_CONSOLE_WARN: bool = true; | |
const ENABLE_CONSOLE_ERROR: bool = true; | |
macro_rules! debug { |
This file contains hidden or 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
[tasks.default] | |
alias = "fast" | |
[tasks.fast] | |
dependencies = ["build", "test", "clippy", "doc"] | |
[tasks.all] | |
dependencies = ["check", "fast"] | |
[tasks.full] |
This file contains hidden or 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 | |
cargo outdated --exit-code 1 && cargo audit |
This file contains hidden or 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 | |
# Install or update Zig on Debian | |
set -xeo pipefail | |
dst="$HOME/zig" | |
minisign_pub="RWSGOq2NVecA2UPNdBUZykf1CCb147pkmdtYxgb3Ti+JO/wCYvhbAb/U" | |
json_url="https://ziglang.org/download/index.json" | |
version="master" | |
arch="x86_64" | |
os="linux" | |
json_file="$(basename "$json_url")" |
This file contains hidden or 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
Windows Registry Editor Version 5.00 | |
; https://superuser.com/a/1264295 | |
; | |
; The hex data is in five groups of four bytes: | |
; 00,00,00,00,\ header version (always 00000000) | |
; 00,00,00,00,\ header flags (always 00000000) | |
; 03,00,00,00,\ # of entries (3 in this case) plus a NULL terminator line. | |
; Entries are in 2-byte pairs: Key code to send & keyboard key to send it. | |
; Each entry is in LSB, MSB order. |
This file contains hidden or 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
[alias] | |
d = diff --color=always | |
dc = d --cached | |
dcw = d --cached --word-diff=color | |
dw = d --word-diff=color | |
dwc = d --word-diff=color --cached | |
s = status | |
l = log --show-signature --stat --numstat | |
ln = log --show-signature --name-status --stat --numstat | |
lp = log --show-signature -p --stat --numstat |
This file contains hidden or 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
winget upgrade -h --all | |
rustup self update | |
rustup update | |
cargo list --outdated --update |