Skip to content

Instantly share code, notes, and snippets.

View gene1wood's full-sized avatar
🎩

Gene Wood gene1wood

🎩
View GitHub Profile
@gene1wood
gene1wood / hash_mysql_password.sh
Created October 30, 2014 22:28
One line python command to generate MySQL hashed password
echo "mypassword" | python -c "import hashlib; import sys; m = hashlib.sha1(); m.update(sys.stdin.read()); n = hashlib.sha1(); n.update(m.digest()) ; print('*' + n.hexdigest().upper())"
@gene1wood
gene1wood / hide-boing-boing-ads.user.js
Last active September 27, 2020 20:49
Greasemonkey User Script to hide sponsored posts on boingboing.net
// ==UserScript==
// @name Block Boing Boing Ads
// @namespace http://cs.cementhorizon.com
// @description Block Boing Boing Ads
// @include http://boingboing.net/*
// @include https://boingboing.net/*
// @require http://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js
// @version 5
// @grant none
// ==/UserScript==
@gene1wood
gene1wood / auto-select-private-in-google-calendar-item-NOT-WORKING.js
Created December 15, 2014 23:59
NOT WORKING : Auto Select Private Visibility for Google Calendar Items
// ==UserScript==
// @name Auto Select Private Visibility for Google Calendar Items
// @namespace http://cs.cementhorizon.com
// @description Auto Select Private Visibility for Google Calendar Items
// @include https://www.google.com/calendar/*
// @require http://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js
// @version 1
// @grant none
// ==/UserScript==
@gene1wood
gene1wood / one-page-bootstrap.html
Created December 18, 2014 05:43
One page Bootstrap using CDN delivered js and css
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Title Goes Here</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
@gene1wood
gene1wood / batch-delete-gmail-emails.js
Last active May 20, 2024 00:41
A Google Apps Script script to bulk delete large amounts of email in Gmail while avoiding the error #793 which Gmail encounters normally
/*
This script, when used with Google Apps Scripts, will delete 400 emails and
can be triggered to run every few minutes without user interaction enabling you
to bulk delete email in Gmail without getting the #793 error from Gmail.
Google returns a maximum of 500 email threads in a single API call.
This script fetches 400 threads in case 500 threads is causing timeouts
Configure the search query in the code below to match the type of emails
you want to delete
@gene1wood
gene1wood / get_github_pubkey.py
Created January 9, 2015 22:01
A script to fetch a users ssh public key from github to be used with sshd and AuthorizedKeysCommand
#!/bin/env python
import sys
import requests
import re
# To use this script with openssh-server 6.2 or newer
# Add these lines to /etc/ssh/sshd_config
#
# AuthorizedKeysCommand /path/to/get_github_pubkey.py
@gene1wood
gene1wood / create_user
Last active March 4, 2024 05:25
A tool to create a user and populate it's ssh authorized_keys file with their github public keys
#!/bin/bash
if [ "$#" -lt "1" ]; then
echo "usage"
echo "$0 GITHUB_USERNAME UNIX_USERNAME"
echo "$0 GITHUB_AND_UNIX_USERNAME"
echo "$0 GITHUB_USERNAME -G wheel UNIX_USERNAME"
echo "$0 GITHUB_USERNAME --home /opt/foo -G wheel UNIX_USERNAME"
exit 1
fi
@gene1wood
gene1wood / install-depot-multisystem.sh
Last active April 15, 2020 22:36
Create MultiBoot USB
#! /bin/bash
exec >& >(tee -a /tmp/debug-install-depot-multisystem.txt)
# │▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒│
# │ install-depot-multisystem.sh │
# │ written by François Fabre │
# │ MultiSystem LiveUSB │
# │▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒│
# Mr Fabre François @frafa
@gene1wood
gene1wood / launch.jnlp
Created February 6, 2015 20:44
How to modify the SuperMicro IPMI Remote Console java applet to use a port other than 443
<jnlp spec="1.0+" codebase="https://localhost:8443/">
<information>
<title>ATEN Java iKVM Viewer</title>
<vendor>ATEN</vendor>
<description>Java Web Start Application</description>
</information>
<security>
<all-permissions/>
</security>
#!/usr/bin/python
import argparse, sys, re, time
from boto.vpc import connect_to_region
import boto.exception
import boto
import boto.ec2
#----------------------------------------------------------
def create_connection_to_aws(region):