Skip to content

Instantly share code, notes, and snippets.

@owyongsk
owyongsk / cf_chameleon.js
Last active February 14, 2025 21:25
A quick way to have Dropbox Public Folder for free using Cloudflare Workers! Inspired by https://github.com/owyongsk/chameleon.
/***
1. Create an app on your https://www.dropbox.com/developers/apps/create, choose "Dropbox API",
set permissions to "Apps folder", generate a token Refresh until image loads
2. Deploy this code to Cloudflare Workers.
3. Set your token as env variable DROPBOX_TOKEN in Cloudflare worker
4. Move all your files to your ~/Dropbox/Apps/'dropbox-app-name-earlier' folder
5. Look at your file at https://example.com/path/to/file.html if you have a
file ~/Dropbox/Apps/'dropbox-app-name-earlier'/path/to/file.html
@Sinistral2099
Sinistral2099 / 7z2zip
Last active July 21, 2021 18:31
Bash scripts for managing ROM files
#!/bin/bash
version="0.2"
if [ "$#" -ne 1 ]; then
echo "Usage: $(basename $0) [7z file]"
exit 0
fi
function error() {
@bleonard252
bleonard252 / viewer.html
Last active June 27, 2020 10:53
Myfile viewer
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Myfile Tester/Viewer/Thing</title>
<script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/abodelot/jquery.json-viewer@master/json-viewer/jquery.json-viewer.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/abodelot/jquery.json-viewer@master/json-viewer/jquery.json-viewer.css">
@5andr0
5andr0 / GetPw.py
Last active November 17, 2021 18:35 — forked from t0phr/GetPw.py
Scan script for nzbget.
#!/usr/bin/python3.8
##############################################################################
### NZBGET SCAN SCRIPT ###
#
# Scans filename of incoming NZBs for embedded passwords.
#
##############################################################################
### OPTIONS ###
# The RegEx to match the password in the filename.
#regex=(.*)\{\{(.*)\}\}.nzb
#!/bin/sh
#######################################
### NZBGET POST-PROCESSING SCRIPT ###
# Moves downloads to a configured location using rclone and load balances over
# multiple remotes
#
#
# NOTE: Requires sh, coreutils or busybox, screen and rclone. Remotes must be setup in rclone.conf.
@hairyhenderson
hairyhenderson / dstest.go
Created May 7, 2019 01:33
Using gomplate datasources programatically
package main
import (
"fmt"
"github.com/hairyhenderson/gomplate/data"
)
func main() {
d, err := data.NewData([]string{"ip=https://ipinfo.io"}, nil)
@mdirkse
mdirkse / generate-slideshow.sh
Last active July 10, 2018 23:14
Generate a slideshow from jpg's with audio
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
DOCKER_WORKDIR="/slideshow"
WORKDIR="work"
# Parameters
AUDIO_FILE="music.mp3"
@manekinekko
manekinekko / open-in-cloud-shell.md
Last active February 4, 2025 18:30
gcloud.tips: use the Google Cloud Shell to clone and edit a github repository

Open a github repository in the Cloud Shell

The Google Cloud Shell gives you a handy and quick Shell access to your Cloud instance. One thing you may not know is that you can use the Cloud Shell to clone and edit a Github project. Let's see how.

The trick here is to just call the following URL: https://console.cloud.google.com/cloudshell/open with the following parameters:

  1. git_repo: this is the URL to your github repository
  2. open_in_editor: this would be the file you want to open in the editor
  3. page=editor: this tells the cloud shell to open the code editor
@fasiha
fasiha / youtube-dl-crunchyroll.md
Last active October 12, 2024 00:16
Youtube-dl with Crunchyroll

Get the following:

  • a Crunchyroll account (though they let you watch/download some videos without an account, at 480p),
  • the latest youtube-dl (brew upgrade youtube-dl),
  • your browser’s user agent,
  • your Crunchyroll cookies (cookie.txt export for Chrome is handy) into a cookies.txt file.

Then,

#!/bin/bash
set -o pipefail
set -s
#####
# This script will take a fresh KDE Neon install and make it suitable for getting stuff done.
# It may not work against another Ubuntu Installation type.
# Run it with: bash <(wget -qO- https://git.io/vSe77)
#####