Skip to content

Instantly share code, notes, and snippets.

View deekayen's full-sized avatar
🏡
Working from home

David Norman deekayen

🏡
Working from home
View GitHub Profile
@vangberg
vangberg / todo
Created September 7, 2008 19:37
Best To-Do List. Ever.
#!/bin/sh
# Best To-Do List. Ever.
#
# Usage:
# 1. Add a new item to list: `todo This needs to be fixed`
# 2. Edit the to-do list: `todo -e`
# 3. Show the current to-do's: `todo`
if [[ $1 ]]; then
if [ $1 = "-e" ]; then
@ziadoz
ziadoz / awesome-php.md
Last active April 17, 2024 21:06
Awesome PHP — A curated list of amazingly awesome PHP libraries, resources and shiny things.
@shrop
shrop / brewStack.md
Last active October 11, 2023 20:18
brewStack Docs
anonymous
anonymous / site-db-backup
Created December 28, 2012 15:34
Backup a Drupal site's database using drush, minus disposable data.
#!/bin/bash
# Check for the existance of drush on the system
if [[ ! -x /bin/drush || ! -x /usr/bin/drush ]]; then
echo "This script requires drush!"
echo
exit 3
fi
if [[ -z ${1} ]]; then
@shrop
shrop / rebuild-perms.php
Last active December 30, 2015 04:19
Rebuild permissions for running via Drush (no batch process)
<?php
/**
* @file
* Rebuild the node access database with no php time limits.
*/
/**
* Rebuilds the node access database (for use with drush php-script).
*
@shrop
shrop / CrashPlan Pause-Resume.scpt
Created March 29, 2014 20:46
CrashPlan Pause/Resume
set isCrashPlanRunning to false
try
set pid to do shell script ¬
"sudo launchctl list | grep com.crashplan.engine" user name "username" password ¬
"password" with administrator privileges
set isCrashPlanRunning to true
end try
if isCrashPlanRunning then
log "CrashPlan is already running: " & pid
@garlandkr
garlandkr / ami-clean.sh
Last active March 20, 2023 08:19
Clean-up an Amazon EC2 instance before creating an AMI
#!/bin/bash
# Run this script with:
# bash <(curl -s https://gist.github.com/garlandkr/e80674b49270b0199fa6/raw/ami-clean.sh
function print_green {
echo -e "\e[32m${1}\e[0m"
}
print_green 'Clean Yum'
@nocturnalgeek
nocturnalgeek / MailinatorAliases
Last active April 8, 2024 20:45
A list of alternate domains that point to @mailinator.com
@binkmail.com
@bobmail.info
@chammy.info
@devnullmail.com
@letthemeatspam.com
@mailinater.com
@mailinator.net
@mailinator2.com
@notmailinator.com
@reallymymail.com
anonymous
anonymous / trim_drupal_node_revisions.sql
Created October 3, 2014 17:58
Delete revisions from the Drupal 7 node_revisions table such that only the newest 3 revisions remain for each node. It joins on the node table to make sure that the current, active vid assigned in the node table doesn't get deleted.
DELETE FROM node_revisions WHERE vid IN (
SELECT subquery.vid FROM (
SELECT @row_num := IF(@prev_value=nr.nid,@row_num+1,1) AS RowNumber
,nr.nid
,nr.vid
,nr.timestamp
,@prev_value := nr.nid
FROM node_revisions nr,
(SELECT @row_num := 1) x,
(SELECT @prev_value := '') y
@superjamie
superjamie / raspberry-pi-vpn-router.md
Last active April 13, 2024 12:22
Raspberry Pi VPN Router

Raspberry Pi VPN Router

This is a quick-and-dirty guide to setting up a Raspberry Pi as a "router on a stick" to PrivateInternetAccess VPN.

Requirements

Install Raspbian Jessie (2016-05-27-raspbian-jessie.img) to your Pi's sdcard.

Use the Raspberry Pi Configuration tool or sudo raspi-config to: