Skip to content

Instantly share code, notes, and snippets.

@4ydx
4ydx / background.js
Created May 21, 2024 01:49 — forked from danharper/background.js
Bare minimum Chrome extension to inject a JS file into the given page when you click on the browser action icon. The script then inserts a new div into the DOM.
// this is the background code...
// listen for our browerAction to be clicked
chrome.browserAction.onClicked.addListener(function (tab) {
// for the current tab, inject the "inject.js" file & execute it
chrome.tabs.executeScript(tab.ib, {
file: 'inject.js'
});
});
@danharper
danharper / background.js
Last active May 21, 2024 01:49
Bare minimum Chrome extension to inject a JS file into the given page when you click on the browser action icon. The script then inserts a new div into the DOM.
// this is the background code...
// listen for our browerAction to be clicked
chrome.browserAction.onClicked.addListener(function (tab) {
// for the current tab, inject the "inject.js" file & execute it
chrome.tabs.executeScript(tab.ib, {
file: 'inject.js'
});
});

Installing Debian on btrfs subvolume

Install debian as usual:

  • EFI partition ~256M, boot, esp flags
  • ext2 boot partition ~512M
  • luks cyrpt volume
    • LVM pv
      • swap ~5G
      • btrfs

When the installation is finished, boot into SystemRescueCD.

@patpohler
patpohler / Big List of Real Estate APIs.md
Last active May 21, 2024 01:43
Evolving list of Real Estate APIs by Category

Big List of Real Estate APIs

Listings / Property Data

####Rets Rabbit http://www.retsrabbit.com

Rets Rabbit removes the nightmare of importing thousands of real estate listings and photos from RETS or ListHub and gives you an easy to use import and Web API server so you can focus on building your listing search powered website or app.

@ctlllll
ctlllll / longest_chinese_tokens_gpt4o.py
Created May 13, 2024 19:53
Longest Chinese tokens in gpt4o
import tiktoken
import langdetect
T = tiktoken.get_encoding("o200k_base")
length_dict = {}
for i in range(T.n_vocab):
try:
length_dict[i] = len(T.decode([i]))
except:
@JimLiu
JimLiu / How AI Could Empower Any Business | Andrew Ng | TED.ass
Created September 11, 2023 06:53
How AI Could Empower Any Business | Andrew Ng | TED
[Script Info]
Title: How AI Could Empower Any Business | Andrew Ng | TED
ScriptType: v4.00+
WrapStyle: 0
Collisions: Reverse
PlayResX: 384
PlayResY: 288
Timer: 100.0000
ScaledBorderAndShadow: no
@jalaziz
jalaziz / 999-aws-ebs-nvme.rules
Last active May 21, 2024 01:37
CoreOS AWS EBS NVMe udev rules
# Copyright (C) 2018 Jameel Al-Aziz
# Modified for simplicification and use within CoreOS.
#
# Copyright (C) 2006-2016 Amazon.com, Inc. or its affiliates.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License").
# You may not use this file except in compliance with the License.
# A copy of the License is located at
#
@KristinaGagalova
KristinaGagalova / processgff.md
Last active May 21, 2024 01:36
Genomic coordinates tools

List of tools with relevance for genomic coordinates management and comparison, referring especially to annotated genes

List of tools

  1. Convert gtf to gff3
@programminghoch10
programminghoch10 / snapchat_data_extractor.sh
Last active May 21, 2024 01:34
Snapchat Data Extractor
#!/bin/bash
if [[ $(id -u) -ne 0 ]]; then
echo "This script must be run as root"
exit 1
fi
if [ -z $(pm list packages | grep com.snapchat.android) ]; then
echo "Snapchat not found"
exit 1
fi
@oskar456
oskar456 / README.md
Last active May 21, 2024 01:34
CLAT for Linux using Jool and ipvlan PoC

CLAT for Linux using ipvlan

This proof of concept uses ipvlan feature of Linux to split up main network interface into two in order to use one in a separate namespace with jool-siit performing CLAT translation.

This way, enabling CLAT is least intrusive to the default network namespace - no need to enable forwarding or touch firewall rules.