Skip to content

Instantly share code, notes, and snippets.

@joboet
joboet / 0000-pattern-types.md
Last active April 27, 2024 01:47
Pattern types RFC

Summary

This RFC introduces pattern types, which are subtypes of matchable types that are statically restricted to a subset of the variants of the original type.

@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active April 27, 2024 01:47
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@y-polek
y-polek / doze_mode_adb_commands.sh
Last active April 27, 2024 01:43
adb commands to test Doze mode
#! /bin/zsh
# Buttery powered state
adb shell dumpsys battery | grep powered
# Unplug battery
adb shell dumpsys battery unplug
# Reset battery
adb shell dumpsys battery reset
@AveYo
AveYo / . steam_overlay_clear.bat
Last active April 27, 2024 01:42
Steam minimal resource usage after removal of -no-browser & -vgui options. Enter script in powershell then use Steam_min shortcut on Desktop instead
@(set "0=%~f0"^)#) & powershell -nop -c iex([io.file]::ReadAllText($env:0)) & timeout /t 7 & exit /b
# CLEAR THOSE ANNOYING MEDIA PLAYING STEAM OVERLAY BROWSER WINDOWS YOU FORGOT ABOUT - BY AVEYO
$found = $false; $utf8 = new-object Text.UTF8Encoding $false
$userdata = join-path (gp HKCU:\SOFTWARE\Valve\Steam SteamPath -ea 0).SteamPath 'userdata'; pushd $userdata;
dir -rec -file localconfig.vdf |% {
$cfg = $_; $data = [io.file]::ReadAllLines($cfg, $utf8); $ok = $true
if (($data |% {$_ -like '*OverlaySavedData*'}) -notcontains $true) { echo "$cfg : no steam overlay saved data"; $ok = $false }
if ($ok) { if (get-process -name Steam -ea 0) { start -wait "$(split-path $userdata)\Steam.exe" -args '-shutdown' } }
@lavantien
lavantien / modern-software-engineering-resources.md
Last active April 27, 2024 01:41
Modern Software Engineering Resources

Modern Software Engineering

Knowledge and Education should be open and free. Hierarchy and Exploitation must be abolished.

  • Z. (down) Notes below. Avoid funnel sales, if you spent money, there's something wrong. Also don't forget good OpSec, self defense gears, and physical/mental strength.
  • A. (go) Development Environment (10 items) (Linux, Neovim, Dev Tools, Languages, Configs, Security, Dotfiles).
  • B. (go) Complementary Subjects (280 items) (Linguistics, English, Security, OpSec, Psychology, Anthropology, History, Philosophy, Economics, Business, Defense, Cooking, Xenology, Self Defense).
  • C. (go) Fundamentals of Science and Technology (130 items) (Logic, Physics (Classical/Quantum Mechanics, Thermodynamics, Electricity, Relativity, Electronics, Electromagnetism, Optoelectronic, Semiconductor, Fusion), Mathematics (Calculus, Linear Algebra, Statistics, Applied
@albertnis
albertnis / bedside_button.yaml
Created February 17, 2020 07:07
Making a custom multi-click push button using ESPHome
esphome:
name: bedside_button
platform: ESP8266
board: esp12e
wifi:
ssid: "ssid"
password: "example"
logger:
@Sh4yy
Sh4yy / clx.go
Created April 25, 2024 20:39
Generate CLI commands for common tasks.
package main
import (
"context"
"errors"
"fmt"
"io"
"log"
"os"
"runtime"
@dmandrade
dmandrade / gist:e76a2da8da8a325f3ab9e275da15d5d9
Last active April 27, 2024 01:39
React Native build unsigned apk without development server
# create assets folder in the current project
$ mkdir android/app/src/main/assets
# create bundle script
$ react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/
# execute command to run android to create debug apk
$ react-native run-android
# change to android folder
@ymmt2005
ymmt2005 / howto-tech-docs.md
Last active April 27, 2024 01:38
技術文書の書き方

技術文書の書き方

このメモは、私(@ymmt2005)が長年にわたってソフトウェアプロダクト開発に関わってきて 2022年現在こうしたほうが良いと考えているベストプラクティスです。

科学的な分析等に基づくわけではない経験則であるため、今後も随時見直すことがありますし、 ここに書いてあることが常に正しいわけでもあらゆるソフトウェア開発に適するわけでもありません。

しかしながら、実務経験が豊富で、モダンな技術スタックに明るいエンジニアの経験則は一定の 役に立つのではないかと考えて記します。