Skip to content

Instantly share code, notes, and snippets.

@beporter
beporter / add_to_cart.user.js
Last active August 18, 2023 21:43
Greasemonkey script to repeatedly refresh a given page, look for specific "Add to Cart" buttons, click them if present, and make a lot of noise on success.
// ==UserScript==
// @name Add Saved Items to Cart
// @namespace https://gist.github.com/beporter/ce76204bcba35d9edb66b395bb5e9305
// @version 0.5
// @description Repeatedly refresh a given "saved items" page (Amazon, Walmart, BestBuy), look for specific "Add to Cart" buttons, click them if present, and make a lot of noise on success.
// @author https://github.com/beporter
// @match https://www.amazon.com/gp/registry/wishlist/*
// @match https://www.amazon.com/hz/wishlist/ls/*
// @match https://www.bestbuy.com/cart
// @match https://www.bestbuy.com/site/customer/lists/manage/saveditems
@miigotu
miigotu / freenas.sr.help.fix.txt
Last active May 29, 2020 17:17 — forked from Agurri/freenas.sr.help.fix.txt
FreeNAS Sickrage - Help & Info Web Page Fix
After switching to the new repo and updating, I lost the ability to see the SickRage Version, branch and commit on the Help & Info page. After trying seveal methods, I've came down to this ... It might not be the only way to do it, but it worked for me as of today (01/29/2016)
Credits go to neoatomic and delfrogo (https://forums.freenas.org/index.php?threads/new-sickrage-repo.39368/)
Step 1.
Do a backup with the Sickrage GUI. The procedure should not break anything but let's be cautious.
Step 2.
Stop Sickrage plugin in the FreeNAS GUI by going in Plugins, Installed, Stop.
@nickv2002
nickv2002 / undupe-transode.py
Created January 19, 2020 05:20
Transcode Found Video Files to HEVC (H.265) and optimally remove the older versions
#!/usr/bin/env python3
import os
import sys
import glob
import subprocess
import shlex
import shutil
import pathlib
import itertools
@Lathanao
Lathanao / Install Mozjpeg 4 on Debian Ubuntu Mint
Last active March 19, 2024 14:07 — forked from Kelfitas/mozjpeg-install-debian
Install Mozjpeg 4 on debian / Ubuntu
#!/bin/bash
echo ""
echo "---------------------------------"
echo "| AUTO COMPILE MOZJPEG |"
echo "---------------------------------"
echo ""
echo "Apt update"
sudo apt update && apt upgrade && apt remove $(deborphan) && apt autoremove && apt clean
echo "Update"
sudo apt update
@jacobsalmela
jacobsalmela / mergePDFs.py
Last active November 21, 2020 22:44
Merge PDFs using Python
#!/usr/bin/env python
# Jacob Salmela
# Make PyPDF2 is installed: sudo easy_install PyPDF2
# https://jacobsalmela.com/2016/08/12/merge-pdfs-natively-with-a-right-click-in-os-x/
import sys
import os
from PyPDF2 import PdfFileMerger, PdfFileReader
merger = PdfFileMerger()
#!/usr/bin/perl
# This filter changes all words to Title Caps, and attempts to be clever
# about *un*capitalizing small words like a/an/the in the input.
#
# The list of "small words" which are not capped comes from
# the New York Times Manual of Style, plus 'vs' and 'v'.
#
# 10 May 2008
# Original version by John Gruber:
@dalegaspi
dalegaspi / python27_on_centos65.md
Last active September 9, 2021 05:29
Installing Python 2.7 on CentOS 6.5

Installing Python 2.7 on Centos 6.5

Centos 6.* comes with Python 2.6, but we can't just replace it with v2.7 because it's used by the OS internally (apparently) so you will need to install v2.7 (or 3.x, for that matter) along with it. Fortunately, CentOS made this quite painless with their Software Collections Repository

sudo yum update # update yum
sudo yum install centos-release-scl # install SCL 
sudo yum install python27 # install Python 2.7

To use it, you essentially spawn another shell (or script) while enabling the newer version of Python:

@akorn
akorn / rsync_parallel.sh
Last active January 26, 2024 08:18 — forked from rcoup/rsync_parallel.sh
This script can transfer large directory structures with parallel rsync workers. Example command line: `rsync_parallel . -- -aHSAX --exclude '*13' . /tmp/2/.`
#!/bin/zsh
#
# Copyright (c) 2014, 2020 by Dr. András Korn. Implements the basic idea of a similar script by Robert Coup (2013).
# License: GPLv3
function usage() {
echo 'Usage:
rsync_parallel [--parallel=N] <args to find(1) to generate list of stuff to transfer> -- <args to rsync>
@rcoup
rcoup / rsync_parallel.sh
Created April 10, 2013 21:52
Parallel-ise an rsync transfer when you want multiple concurrent transfers happening,
#!/bin/bash
set -e
# Usage:
# rsync_parallel.sh [--parallel=N] [rsync args...]
#
# Options:
# --parallel=N Use N parallel processes for transfer. Defaults to 10.
#
# Notes:
@agramfort
agramfort / lowess.py
Last active August 16, 2023 06:19
LOWESS : Locally weighted regression
"""
This module implements the Lowess function for nonparametric regression.
Functions:
lowess Fit a smooth nonparametric regression curve to a scatterplot.
For more information, see
William S. Cleveland: "Robust locally weighted regression and smoothing
scatterplots", Journal of the American Statistical Association, December 1979,