Skip to content

Instantly share code, notes, and snippets.

@k06a
k06a / lohi.h
Created January 21, 2022 12:23
Efficient BigInt - Lohi (uint128_t, uint256_t, uint512_t)
#ifndef Lohi_h
#define Lohi_h
namespace lohi {
template<typename T>
struct Lohi;
template<typename T>
T zero(thread const T &) {
return 0;
@mahemoff
mahemoff / README.md
Last active April 6, 2024 00:38
Vim Terminal Mode - A short introduction

Vim has a Terminal Mode!

Since v8.1 (May 2018), Vim has shipped with a built-in terminal. See https://vimhelp.org/terminal.txt.html or type :help terminal for more info.

Why use this? Mainly because it saves you jumping to a separate terminal window. You can also use Vim commands to manipulate a shell session and easily transfer clipboard content between the terminal and files you're working on.

Key Bindings

@nstarke
nstarke / resize-ghidra-gui.md
Last active April 20, 2024 08:20
Resize Ghidra GUI for High DPI screens

Resize Ghidra for High DPI screens

If you run Ghidra on a high DPI screen, you will probably find the GUI to be scaled down so small to be almost of no use.

There is a setting that you can adjust to scale the Ghidra GUI:

in $GHIDRA_ROOT/support is a file named launch.properties. In this launch.properties file is the following configuration key:

VMARGS_LINUX=-Dsun.java2d.uiScale=1
@onyb
onyb / curve.py
Created January 9, 2020 23:21
secp256k1 Python workshop code
from dataclasses import dataclass
from field import FieldElement, PrimeGaloisField
@dataclass
class EllipticCurve:
a: int
b: int
@fnky
fnky / ANSI.md
Last active July 3, 2024 02:40
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
ObjC.import('Foundation');
var app = Application.currentApplication()
app.includeStandardAdditions = true
var args = $.NSProcessInfo.processInfo.arguments;
var argv = []
var argc = args.count // -[NSArray count]
for (var i = 0; i < argc; i++) {
argv.push( ObjC.unwrap( args.objectAtIndex(i) ) ) // -[NSArray objectAtIndex:]
}
@zthxxx
zthxxx / Activate Office 2019 for macOS VoL.md
Last active July 2, 2024 11:24
crack activate Office on mac with license file
@cmer
cmer / haproxy.cfg
Last active April 15, 2024 09:54
Simple, no bullshit TCP port forwarding using HAProxy
listen l1
bind 0.0.0.0:443
mode tcp
timeout connect 4000
timeout client 180000
timeout server 180000
server srv1 host.example.com:9443
@harv
harv / cross_and_static_compile_shadowsocks-libev.sh
Last active February 18, 2024 12:05
cross & static compile shadowsocks-libev
#!/bin/sh
# cross & static compile shadowsocks-libev
PCRE_VER=8.41
PCRE_FILE="http://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-$PCRE_VER.tar.gz"
MBEDTLS_VER=2.6.0
MBEDTLS_FILE="https://tls.mbed.org/download/mbedtls-$MBEDTLS_VER-gpl.tgz"