Skip to content

Instantly share code, notes, and snippets.

@leoetlino
leoetlino / nnMain_150.cpp
Created April 26, 2019 11:17
BotW nnMain 1.5.0 vs 1.6.0
void nnMain()
{
// [COLLAPSED LOCAL DECLARATIONS. PRESS KEYPAD CTRL-"+" TO EXPAND]
sead::system::Print("0000002d\n"); // version number. 0x10 in 1.0.0
Profiler::Push("起動時間");
Profiler::Push("main");
_WriteStatusReg(FPCR, _ReadStatusReg(FPCR) | 0x1000000);
@stellasphere
stellasphere / descriptions.json
Last active April 20, 2024 09:53
WMO weather interpretation code descriptions (& images)
{
"0":{
"day":{
"description":"Sunny",
"image":"http://openweathermap.org/img/wn/01d@2x.png"
},
"night":{
"description":"Clear",
"image":"http://openweathermap.org/img/wn/01n@2x.png"
}
@OrionReed
OrionReed / dom3d.js
Last active April 20, 2024 09:52
3D DOM viewer, copy-paste this into your console to visualise the DOM topographically.
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks.
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/)
(() => {
const SHOW_SIDES = false; // color sides of DOM nodes?
const COLOR_SURFACE = true; // color tops of DOM nodes?
const COLOR_RANDOM = false; // randomise color?
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com)
const MAX_ROTATION = 180; // set to 360 to rotate all the way round
const THICKNESS = 20; // thickness of layers
const DISTANCE = 10000; // ¯\\_(ツ)_/¯
@sosukeinu
sosukeinu / send-message.py
Created December 24, 2012 17:38 — forked from ser1zw/send-message.py
PYTHON send E-mail from eml file
#!/usr/bin/env python
# -*- mode: python; coding: utf-8-unix -*-
import sys
import os.path
import smtplib
if len(sys.argv) <= 2:
print('Usage:')
print(' $ python ' + sys.argv[0] + ' mailfrom rcptto <emlfile>')
print
@zthxxx
zthxxx / Activate Office 2019 for macOS VoL.md
Last active April 20, 2024 09:46
crack activate Office on mac with license file
@charlesaloaye
charlesaloaye / gist:d5234275c8ed0bb4510ffaa9670d80aa
Last active April 20, 2024 09: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iOiIyMDI0LTEwL
@EDDxample
EDDxample / Lattice Basics.ipynb
Last active April 20, 2024 09:43
Lattice Basics for RNG Seed finding
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@fabiospampinato
fabiospampinato / inspect.zsh
Last active April 20, 2024 09:38
Node.js inspect function and plugin for zsh
# INSPECT
function inspect () {
eval NODE_OPTIONS="--inspect-brk" $@
}
# INSPECT PLUGIN
# Toggles the "inspect " prefix upon double ESC key
function plugin-inspect () {
@y-polek
y-polek / doze_mode_adb_commands.sh
Last active April 20, 2024 09:36
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

ZSH CheatSheet

This is a cheat sheet for how to perform various actions to ZSH, which can be tricky to find on the web as the syntax is not intuitive and it is generally not very well-documented.

Strings

Description Syntax
Get the length of a string ${#VARNAME}
Get a single character ${VARNAME[index]}