Skip to content

Instantly share code, notes, and snippets.

View yakov116's full-sized avatar

yakov116

View GitHub Profile
@sindresorhus
sindresorhus / esm-package.md
Last active May 4, 2024 15:48
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@Arinerron
Arinerron / root.sh
Last active March 7, 2024 09:24
"Root" via dirtyc0w privilege escalation exploit (automation script) / Android (32 bit)
#!/bin/bash
# Give the usual warning.
clear;
echo "[INFO] Automated Android root script started.\n\n[WARN] Exploit requires sdk module \"NDK\".\nFor more information, visit the installation guide @ https://goo.gl/E2nmLF\n[INFO] Press Ctrl+C to stop the script if you need to install the NDK module. Waiting 10 seconds...";
sleep 10;
clear;
# Download and extract exploit files.
echo "[INFO] Downloading exploit files from GitHub...";
@fregante
fregante / git-get-git-put.md
Created June 30, 2015 18:34
Use git get and put instead of git pull and push

As explained on Don't Be Scared of git rebase, git fetch+rebase is a better alternative to git pull; unfortunately it's not as concise.

git get

From now on, use git get instead of git pull, a custom command that does this:

# get data from remote
git fetch origin
# rebase the remote branch with the same name as local
@armadsen
armadsen / LabelDimensions.csv
Created March 4, 2013 18:49
CSV file containing dimensions information for various Avery label sheets.
labelTypeName labelSheetWidth labelSheetHeight topMargin bottomMargin leftMargin rightMargin numberOfRows numberOfColumns horizontalGutter verticalGutter
Avery 2160 Bottom 8.5 11 5.5 0.5 0.81 0.81 4 1 0 0
Avery 2160 Top 8.5 11 0.5 5.5 0.81 0.81 4 1 0 0
Avery 2162 Bottom 8.5 11 5.5 0.5 0.125 0.125 3 1 0 0
Avery 2162 Top 8.5 11 0.5 5.5 0.125 0.125 3 1 0 0
Avery 2163 Bottom 8.5 11 5.5 0.5 0.125 0.125 2 1 0 0
Avery 2163 Top 8.5 11 0.5 5.5 0.125 0.125 2 1 0 0
Avery 2164 Bottom 8.5 11 5.844 0.844 0.125 0.125 1 1 0 0
Avery 2164 Top 8.5 11 0.844 5.844 0.125 0.125 1 1 0 0
Avery 5159 8.5 11 0.25 0.25 0.156 0.156 7 2 0.188 0