Skip to content

Instantly share code, notes, and snippets.

@fnky
fnky / ANSI.md
Last active January 1, 2025 20:24
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@ongrid
ongrid / bip44_generator.py
Last active January 1, 2025 20:23
BIP-44 mnemonic generator
# This snippet generates BIP-39 mnemonic (seed phrase)
# then derives 10 Ethereum private keys from it (with their addresses)
# The same algorithm and paths are used in Metamask, Trust Wallet, Ganache, hardhat
# and other popular wallets and tools.
from bip44 import Wallet
from bip44.utils import get_eth_addr
from mnemonic import Mnemonic
mnemo = Mnemonic("english")
words = mnemo.generate()
@andyyou
andyyou / gist:3052671
Created July 5, 2012 09:46
C# Controls abbreviation
btn Button chk CheckBox ckl CheckedListBox
cmb ComboBox dtp DateTimePicker lbl Label
llb LinkLabel lst ListBox lvw ListView
mtx MaskedTextBox cdr MonthCalendar icn NotifyIcon
nud NumeircUpDown pic PictureBox prg ProgressBar
rdo RadioButton rtx RichTextBox txt TextBox
tip ToolTip tvw TreeView wbs WebBrowser
容器
flp FlowLayoutPanel grp GroupBox pnl Panel
@richard512
richard512 / js-packer-unpacker.htm
Created April 7, 2017 09:08
JavaScript Packer UnPacker
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>UnPacker</title>
</head>
<style> textarea {width: 100%} </style>
<body>
@snobu
snobu / config.txt
Created March 29, 2018 09:21
Raspberry Pi 2560x1440@60Hz
hdmi_group=2
hdmi_mode=87
hdmi_cvt=2560 1440 60 3 0 0 1
max_framebuffer_width=2560
max_framebuffer_height=1440
hdmi_pixel_freq_limit=400000000
@hyone
hyone / gist:d6018ee1ac8f9496fed839f481eb59d6
Last active January 1, 2025 20:12
Practice: implement `Display` trait for `slice` wrapper
use std::fmt::{ Debug, Display, Formatter, Result };
use std::string::ToString;
#[derive(Debug)]
struct Slice<'a, T: 'a> {
data: &'a [T]
}
impl <'a, T: ToString> Display for Slice<'a, T> {
fn fmt(&self, f: &mut Formatter) -> Result {
@sam-ngu
sam-ngu / index.html
Last active January 1, 2025 20:10
Vanilla JS: Convert HTML elements to PDF
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<style>
section {
background-color: #80b8e9;
@ngregoire
ngregoire / burl
Created December 31, 2024 15:18
A simple wrapper that routes curl traffic through Burp Suite
#/usr/bin/env sh
curl --proxy http://127.0.0.1:8080/ --user-agent burl --insecure "$@"
@lopspower
lopspower / README.md
Last active January 1, 2025 20:01
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

@subfuzion
subfuzion / global-gitignore.md
Last active January 1, 2025 19:57
Global gitignore

There are certain files created by particular editors, IDEs, operating systems, etc., that do not belong in a repository. But adding system-specific files to the repo's .gitignore is considered a poor practice. This file should only exclude files and directories that are a part of the package that should not be versioned (such as the node_modules directory) as well as files that are generated (and regenerated) as artifacts of a build process.

All other files should be in your own global gitignore file:

  • Create a file called .gitignore in your home directory and add any filepath patterns you want to ignore.
  • Tell git where your global gitignore file is.

Note: The specific name and path you choose aren't important as long as you configure git to find it, as shown below. You could substitute .config/git/ignore for .gitignore in your home directory, if you prefer.