Skip to content

Instantly share code, notes, and snippets.

@abstraction
abstraction / CopyAsReference.js
Created March 31, 2022 08:27
Quickly copy URL and selection
const copyAsReference = (async () => {
let reference = "";
const getTitleAndURL = document.title + " --- " + location.href;
const getUserSelection = window.getSelection().toString().trim();
if (getUserSelection.length > 0) {
reference = getTitleAndURL + "\nSelection:\n" + getUserSelection;
} else {
reference = getTitleAndURL;
}
try {
@abstraction
abstraction / md-to-org.sh
Created February 16, 2022 01:19
Md to Org
#!/bin/bash
# Context:
# Converted Logseq md file to org-mode mode with title as h1
# Not using Logseq org setting coz there is a lot of headline pollution
for FILE in *.md
do
get_date=`basename $FILE .md`
echo "* $get_date" >> "result.org"

Inclusive fonts

Accessible, inclusive fonts have been playing on my mind lately. So I've spent some time researching options for a workhorse body font.

I've considered a few things:

  1. Font must be highly legible and practical in a wide variety of formats. This includes print, digital, signs, TV, smartboard, soggy paper, laminated sheets, etc. Digital alone has a whole array of sub-categories to consider, including good quality screen, poor quality, low resolution, small screen, large screen, e-ink, etc.
  2. Should come in many weights and styles and be feature rich (at least of regular + bold + italic)
  3. Should be free or inexpensive.
@abstraction
abstraction / 5-fonts.md
Created January 16, 2022 15:02 — forked from charlesroper/5-fonts.md
5 fonts
@abstraction
abstraction / hn.md
Created January 10, 2022 13:49 — forked from jakub-g/hn.md
Hacker News Links

Hacker News "hidden" URLs

Many of HN URLs are not easily discoverable as there are no links to them in a prominent part on the page, or sometimes even nowhere. The following is a list of links to standard and "special" HN pages. The ones is bold are the less discoverable ones.

See also: https://github.com/minimaxir/hacker-news-undocumented

Posts

Cheat sheet: JavaScript Array methods

Deriving a new Array from an existing Array:

['■','●','▲'].slice(1, 3)           ['●','▲']
['■','●','■'].filter(x => x==='■')  ['■','■']
    ['▲','●'].map(x => x+x)         ['▲▲','●●']
    ['▲','●'].flatMap(x => [x,x])   ['▲','▲','●','●']
@abstraction
abstraction / sitemap-bruteforce.js
Created September 7, 2021 10:33
Find a website's sitemap by bruteforce
const axios = require('axios').default;
const SITE = 'https://google.com';
const possibleSitemapLocations = [
'atom.xml',
'page-sitemap.xml',
'post-sitemap.xml',
'rss',
'rss.xml',

I've recently been working on JavaScript Obfuscation. I've read as much as I can from the internet about options and capabilities. It is clear there is one winner out of all the offerings available.

JScrambler Review

JScrambler (https://jscrambler.com/) is a paid product featuring JavaScript Obfuscation capabilities. When it comes to obfuscating JavaScript, it is the gold standard.

This is what the internet proclaimed as I read it [1]. However, it was truly difficult to assess how accurate these claims are; essentially the only public obfuscation examples they provide are:

https://jscrambler.com/products/code-integrity/javascript-obfuscation

#!/bin/bash
printf '\e[1;40;92m'
clear
printf "All TNT releases are provided\n\tfree of charge for educational and uncommercial reasons.\n"
printf "Все релизы TNT предоставляются\n\tбезвозмездно для образовательных и некоммерческих целей.\n"
echo ""
echo "Press ENTER if you agree or close this window!"
echo "Нажмите ENTER, если вы согласны, или закройте окно!"
read ok
echo "Please wait..."

codesign

sign unsigned package yourself (carefully debug first with ghidra, virustotal etc ;)

sudo codesign –force –deep –sign – /Applications/Foobar.app

example studio one crack

this is postinstall script from .pkg package