Skip to content

Instantly share code, notes, and snippets.

View 2E0PGS's full-sized avatar

Peter Stevenson 2E0PGS

View GitHub Profile
@JasonMillward
JasonMillward / download.sh
Last active November 5, 2017 20:36
Download imgur.com galleries easily. This snippet downloads the latest 100 pages of images in the wallpaper gallery.
#!/bin/bash
for ((i = 0; i <= 100; i++)); do
echo "Grabbing page $i"
wget -q "http://imgur.com/r/wallpapers/page/$i" -O - | grep 'class="post"' | cut -d\" -f2 | while read id
do
echo "Downloading $id.jpg"
wget -q -c "http://i.imgur.com/$id.jpg"
done
@bbrewer97202
bbrewer97202 / heroku-htaccess.md
Created August 10, 2012 18:20
Simple htaccess authentication on Heroku with cedar/php

Create an .htaccess file in the webroot:

AuthUserFile /app/www/.htpasswd
AuthType Basic
AuthName "Restricted Access"
Require valid-user

Create a .htpasswd file:

htpasswd -c /app/www/.htpasswd [username]

@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 23, 2024 18:01
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@gizzmo
gizzmo / minecraft_backup.bat
Last active October 6, 2017 05:44
Minecraft saves backup script for windows.
@ECHO OFF
SETLOCAL
::Minecraft backup script
::You need to install 7-Zip first. It can be found here: http://www.7-zip.org/
::Please check the path section first before running!
::---------------------------------------------------------------------------------------------------------------------------------------------------------
::Path section
::Set this variable to your Minecraft path. It should be ok for every Windows 7 OS.
@chrisroos
chrisroos / gpg-import-and-export-instructions.md
Created September 9, 2011 10:49
Instructions for exporting/importing (backup/restore) GPG keys

Every so often I have to restore my gpg keys and I'm never sure how best to do it. So, I've spent some time playing around with the various ways to export/import (backup/restore) keys.

Method 1

Backup the public and secret keyrings and trust database

cp ~/.gnupg/pubring.gpg /path/to/backups/
cp ~/.gnupg/secring.gpg /path/to/backups/
cp ~/.gnupg/trustdb.gpg /path/to/backups/

or, instead of backing up trustdb...

@vreon
vreon / .Xresources
Created February 27, 2011 03:26
molokai color theme for xterm
! Molokai theme
*xterm*background: #101010
*xterm*foreground: #d0d0d0
*xterm*cursorColor: #d0d0d0
*xterm*color0: #101010
*xterm*color1: #960050
*xterm*color2: #66aa11
*xterm*color3: #c47f2c
*xterm*color4: #30309b
*xterm*color5: #7e40a5