Skip to content

Instantly share code, notes, and snippets.

View bill-mcgonigle's full-sized avatar

Bill McGonigle bill-mcgonigle

View GitHub Profile
@davidnunez
davidnunez / gist:1404789
Created November 29, 2011 13:20
list all installed packages in android adb shell
pm list packages -f
@rjz
rjz / js-screensaver.js
Created December 18, 2011 22:34
Javascript screensaver
(function(poll, timeout){
var _idle = false,
_lastActive = 0,
_activeNow = function() {
_lastActive = new Date();
if (_idle) {
$('#screensaver').hide();
_idle = false;
@kbarber
kbarber / gist:6456420
Created September 5, 2013 21:26
Renewing a Puppet CA cert
Renew Puppet CA cert.
Not the perfect idea, but should alleviate the need to resign every cert.
What you need from existing puppet ssl directory:
ca/ca_crt.pem
ca/ca_key.pem
Create an openssl.cnf:
[ca]
@jameshfisher
jameshfisher / restore-file-from-package.sh
Created April 12, 2014 17:44
Restore a file from the package that provides it.
#!/bin/bash
# Usage:
#
# sudo ./restore-file-from-package.sh <filepath>
#
# Restore a file from the package that provides it.
#
# Source: http://askubuntu.com/a/67028/30482
sudo apt-get install build-essential pkg-config libc6-dev libssl-dev libexpat1-dev libavcodec-dev libgl1-mesa-dev libqt4-dev git
Create a folder to download and compile the source files
mkdir makemkv.source
cd makemkv.source
Now, we will compile and install the required dependencies: ffmpeg and fdk-aac.
First up: fdk-aac. Download, untar, compile, and install:
@astamicu
astamicu / Remove videos from Youtube Watch Later playlist.md
Last active July 14, 2024 18:28
Script to remove all videos from Youtube Watch Later playlist

UPDATED 22.11.2022

It's been two years since the last update, so here's the updated working script as per the comments below.

Thanks to BryanHaley for this.

setInterval(function () {
    video = document.getElementsByTagName('ytd-playlist-video-renderer')[0];

 video.querySelector('#primary button[aria-label="Action menu"]').click();
@ZeevoX
ZeevoX / README.md
Last active December 17, 2023 23:27
Bash script to get sunrise and sunset times for a set location

Welcome to Bash SunTools!

Simply enter your location ID (which you can obtain from https://weather.codes/search/) into the script and voila!

  • no parameters: both sunrise and sunset
  • -r Fetch sunrise for your entered location from weather.com
  • -s Fetch sunset for your entered location from weather.com
  • -q Be quiet
  • -w Even quieter
  • -l X Specify location ID
  • -h Print this message and exit
@tycho
tycho / lastpass-demangle.py
Last active February 19, 2021 22:45
Demangle the LastPass CSV export format
#!/usr/bin/python3
#
# Usage: ./lastpass-demangle.py lastpass-export.csv > fixed-lastpass-export.csv
#
import csv
import html
import fileinput
import sys
@mattpolito
mattpolito / update-ffmpeg-rpi.sh
Last active August 21, 2022 01:28 — forked from enzanki-ars/update-ffmpeg-rpi.sh
Install/Update FFmpeg with hardware acceleration on the Raspberry Pi
#!/bin/bash
# Compile and install/update (or install via Apt) FFmpeg Codecs
# Compile and install/update FFmpeg suite
# Compile with hardware acceleration
# Modified from https://retroresolution.com/compiling-ffmpeg-from-source-code-all-in-one-script/
echo "Begining Installation of FFmpeg Suite"
#Update APT Repository
echo "Updating the APT repository information"
@bluewalk
bluewalk / GetNordVPNWireGuardDetails.md
Last active July 22, 2024 17:14
Getting NordVPN WireGuard details

About

Instructions to obtain WireGuard details of your NordVPN account. These can be used to setup a WireGuard tunnel on your router to NordVPN.

Source: https://forum.gl-inet.com/t/configure-wireguard-client-to-connect-to-nordvpn-servers/10422/27

Prerequisites

If you have any linux machine, use that or install a vm if you don't have one.

Get their official linux app installed. Make sure you have wireguard installed too. And set the used technology to Nordlynx by running nordvpn set technology nordlynx