Skip to content

Instantly share code, notes, and snippets.

@sudocarlos
sudocarlos / cloudflare_tunnels.sh
Last active April 30, 2024 03:28
Download, configure and run Cloudflare tunnels for Start9 services
#!/usr/bin/env bash
# Warn and prompt
read -p "Note, this script is reckless! You should not be exposing your Start9 the
Internet like this. This will allow Cloudflare to read all processed data.
Do you really want to continue?? [Y/N]" -n 1 -r
if [[ $REPLY =~ ^[Yy]$ ]]; then
# Variables
TUNNEL_NAME=start9
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
// // https://twitter.com/settings/your_twitter_data/twitter_interests
// Lots of discussion and improvement of the original script in the comments
// Here's the best version that works well
// Because Twitter stops the script working after unchecking 50 interests, so you will almost certainly have to run the script multiple times
function sleep(milliseconds) {
return new Promise(function (resolve) {
return setTimeout(resolve, milliseconds);
});
@shmup
shmup / torrents.md
Last active December 9, 2024 09:41
transmission blocklist guide

Transmission Blocklist

The Transmission torrent client has an option to set a Blocklist, which helps protect you from getting caught and having the DMCA send a letter/email.

It's as simple as downloading and installing the latest client:

@joseluisq
joseluisq / terminal-git-branch-name.md
Last active November 25, 2024 08:03
Add Git Branch Name to Terminal Prompt (Linux/Mac)

Add Git Branch Name to Terminal Prompt (Linux/Mac)

image

Open ~/.bash_profile in your favorite editor and add the following content to the bottom.

# Git branch in prompt.

parse_git_branch() {
@tobek
tobek / get-image-urls.js
Last active December 6, 2024 19:33
Save images from chrome inspector/dev tools network tab
/* open up chrome dev tools (Menu > More tools > Developer tools)
* go to network tab, refresh the page, wait for images to load (on some sites you may have to scroll down to the images for them to start loading)
* right click/ctrl click on any entry in the network log, select Copy > Copy All as HAR
* open up JS console and enter: var har = [paste]
* (pasting could take a while if there's a lot of requests)
* paste the following JS code into the console
* copy the output, paste into a text file
* open up a terminal in same directory as text file, then: wget -i [that file]
*/
@simonista
simonista / .vimrc
Last active December 6, 2024 18:45
A basic .vimrc file that will serve as a good template on which to build.
" Don't try to be vi compatible
set nocompatible
" Helps force plugins to load correctly when it is turned back on below
filetype off
" TODO: Load plugins here (pathogen or vundle)
" Turn on syntax highlighting
syntax on
@gerad
gerad / gist:3881072
Created October 12, 2012 19:38
get 50 random words from the dictionary (on mac os x)
awk 'BEGIN {srand()} {print rand() " " $0}' /usr/share/dict/words | sort | head -50