Skip to content

Instantly share code, notes, and snippets.

@adripo
adripo / onbeforescriptexecute.js
Created April 25, 2020 23:19 — forked from maple3142/onbeforescriptexecute.js
polyfill of 'beforescriptexecute' event
// 'beforescriptexecute' event [es5]
// original version: https://gist.github.com/jspenguin2017/cd568a50128c71e515738413cd09a890
;(function() {
;('use strict')
function Event(script, target) {
this.script = script
this.target = target
this._cancel = false
@adripo
adripo / git-tag-delete-local-and-remote.sh
Created December 8, 2020 03:20 — forked from mobilemind/git-tag-delete-local-and-remote.sh
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
@adripo
adripo / wget.sh
Created May 15, 2021 13:43 — forked from crittermike/wget.sh
Download an entire website with wget, along with assets.
# One liner
wget --recursive --page-requisites --adjust-extension --span-hosts --convert-links --restrict-file-names=windows --domains yoursite.com --no-parent yoursite.com
# Explained
wget \
--recursive \ # Download the whole site.
--page-requisites \ # Get all assets/elements (CSS/JS/images).
--adjust-extension \ # Save files with .html on the end.
--span-hosts \ # Include necessary assets from offsite as well.
--convert-links \ # Update links to still work in the static version.
@adripo
adripo / fossil_5e_debloat.txt
Last active December 27, 2021 01:42
Fossil Gen 5E (codename: sole) SAFE DEBLOAT- commands and packages
### COMMANDS
# connect
adb connect WATCH_IP:5555
# list enabled packages
adb shell cmd package list packages -e > enabled_packages.txt
# list disabled packages
adb shell cmd package list packages -d > disabled_packages.txt
@adripo
adripo / console.sh
Created January 1, 2022 18:21
Inject jQuery in the JavaScript Console
var jq = document.createElement('script');
jq.src = "https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js";
document.getElementsByTagName('head')[0].appendChild(jq);
// ... give time for script to load, then type
jQuery.noConflict();
@adripo
adripo / Inject_jQuery.txt
Last active January 1, 2022 18:24
Inject jQuery in the JavaScript Console - Bookmark
javascript:(function(e,s){e.src=s;e.onload=function(){jQuery.noConflict();console.log('jQuery injected')};document.head.appendChild(e);})(document.createElement('script'),'//ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js')
@adripo
adripo / docker-compose.yml
Created May 24, 2022 00:34 — forked from Aghassi/docker-compose.yml
LinuxServer Docker Compose: Plex, Sonarr, Radarr, NZBGet, Let's Encrypt, Time Machine
version: '2'
services:
plex:
image: linuxserver/plex
container_name: plex
volumes:
- /path/to/plex/config:/config
- /path/to/plex/Movies:/data/movies
- /path/to/plex/Shows:/data/tvshows
- /path/to/plex/transcode:/data/transcode
@adripo
adripo / semantic-commit-messages.md
Created January 14, 2023 00:03 — forked from joshbuchea/semantic-commit-messages.md
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@adripo
adripo / change_filament_without_ams.gcode
Last active June 13, 2024 14:36
G-code to manually change filament without AMS. See https://github.com/bambulab/BambuStudio/issues/278
;===== Change filament G-code without AMS ===
;===== version: 1.2 =========================
;===== original version date: 20230719 ======
;===== description ==========================
; Everything between M620 and M621 is executed only if AMS is connected.
; All M620, M620.x and M621 commands are removed to enable manual filament change.
; first filament change is skipped
{if toolchange_count > 1}
@adripo
adripo / trakt-backup.php
Created September 1, 2023 21:59 — forked from darekkay/trakt-backup.php
Trakt.tv backup script
<?php
/*
Backup script for trakt.tv (API v2).
Live demo: https://darekkay.com/blog/trakt-tv-backup/
*/
// create a Trakt app to get a client API key: http://docs.trakt.apiary.io/#introduction/create-an-app
$apikey = "CLIENT_API_KEY";