Skip to content

Instantly share code, notes, and snippets.

@vibol
vibol / gist:70b7545db3d4c76b55da0dbea266e1aa
Created February 21, 2018 21:25
Google Docs: A Google App script for deleting all bookmarks from a Google Doc
// 1. Tools > Script editor...
// 2. Paste the below code
// 3. Run
// 4. Approve permissions
// 5. Go to the document from which Script editor was launched and allow the script to run
function deleteAllBookmarks() {
var ui = DocumentApp.getUi();
var response = ui.alert('This will delete ALL bookmarks in this document. Are you sure you want to continue?', ui.ButtonSet.YES_NO);
@vibol
vibol / install-ffmpeg-amazon-linux.sh
Created November 8, 2015 09:58 — forked from gboudreau/install-ffmpeg-amazon-linux.sh
How to compile ffmpeg on Amazon Linux (EC2)
#!/bin/sh
# Based on instructions found here: http://wiki.razuna.com/display/ecp/FFMpeg+Installation+on+CentOS+and+RedHat#FFMpegInstallationonCentOSandRedHat-InstallX264
if [ "`/usr/bin/whoami`" != "root" ]; then
echo "You need to execute this script as root."
exit 1
fi
cat > /etc/yum.repos.d/centos.repo<<EOF
@vibol
vibol / redirect.sh
Last active December 23, 2015 23:09
Simple shell script to fetch a list of URLs from a text file in parallel. Text file should contain one URL per line. Usage: ./redirect.sh [filelist.txt] [numprocs]
#!/bin/bash
FILE=$1
PROCS=8
if [ ! -z "$2" ]; then
PROCS=$2
fi
if [ ! -z "$FILE" ]; then