Skip to content

Instantly share code, notes, and snippets.

View elidickinson's full-sized avatar

Eli Dickinson elidickinson

View GitHub Profile
@pigeonflight
pigeonflight / install-python-2.7.14.sh
Created May 22, 2018 11:19
Install Python 2.7.14 on Ubuntu 14.04
# usage
# bash install-python-2.7.14.sh
sudo apt-get update
sudo apt-get install build-essential checkinstall -y
sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev -y
cd /usr/src
sudo wget https://www.python.org/ftp/python/2.7.14/Python-2.7.14.tgz
sudo tar xzf Python-2.7.14.tgz
cd Python-2.7.14
sudo ./configure --enable-optimizations
@heymatthew
heymatthew / batch-delete-gmail-emails.js
Last active August 14, 2023 19:55 — forked from gene1wood/batch-delete-gmail-emails.js
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 500 emails and can be triggered to run every minute without user interaction enabling you to bulk delete email in Gmail without getting the #793 error from Gmail.
// Configure the search query in the code below to match the type of emails you want to delete
// Browser to https://script.google.com/.
// Start a script and paste in the code below.
// After you past it in, save it and click the little clock looking button. This is for your triggers. You can set up how frequently you want the script to run (I did mine for every minute).
// Source : # https://productforums.google.com/d/msg/gmail/YeQVDuPIQzA/kpZPDDj8TXkJ
function batchDeleteEmail() {
var batchSize = 100 // Process up to 100 threads at once
@texuf
texuf / premailerfixup.py
Created April 4, 2015 04:02
fix for "WARNING Property: Unknown Property name." error from cssutils
from cssutils import profile
from cssutils.profiles import Profiles, properties, macros
#patch um up
properties[Profiles.CSS_LEVEL_2]['-ms-interpolation-mode'] = r'none|bicubic|nearest-neighbor'
properties[Profiles.CSS_LEVEL_2]['-ms-text-size-adjust'] = r'none|auto|{percentage}'
properties[Profiles.CSS_LEVEL_2]['mso-table-lspace'] = r'0|{num}(pt)'
properties[Profiles.CSS_LEVEL_2]['mso-table-rspace'] = r'0|{num}(pt)'
properties[Profiles.CSS_LEVEL_2]['-webkit-text-size-adjust'] = r'none|auto|{percentage}'
#re-add
profile.addProfiles([(Profiles.CSS_LEVEL_2,
from fabric.api import *
from fabric.context_managers import cd
from fabric.operations import local as lrun, sudo
from fabric.contrib.files import sed
from fabric.utils import warn
from local_fabfile import root, prod, lh, SERVER_IP
def virtualenv(command, run_directory=''):
if run_directory == '':
@steveosoule
steveosoule / april-fools.css
Created April 2, 2013 19:56
april-fools.css
/*
aprilFools.css
Written by Wes Bos
I assume no responsibility for angry co-workers or lost productivity
Put these CSS definitons into your co-workers Custom.css file.
They will be applied to every website they visit as well as their developer tools.
*/
@egid
egid / progressive-template.html
Last active November 14, 2023 14:28
Forking the toggled progressive disclosure template found at the Campaign Monitor 2-column layout (originally at http://www.campaignmonitor.com/guides/mobile/responsive/)
<!--
Progressive Disclosure Demo - Updated 15 August, 2012 by Ros
Thank you for taking a look under the hood of our progressive disclosure demo. Please note that this is a work in progress, so it's a tad messy and bound to change.
If you have any questions, feel free to pop a line to support@campaignmonitor.com - we might learn something, too!
Known bugs
----------
@chaucerbao
chaucerbao / ramdisk
Last active December 14, 2015 04:29
(Mac OSX) Create a ram disk under /Volumes/RamDisk. Put it in `/usr/local/bin/`. Usage: ./ramdisk.sh [size(MB)]
#!/bin/sh
SIZE_MB=${1:-1024}
SECTORS=$((${SIZE_MB}*1024*1024/512))
diskutil erasevolume HFS+ "RamDisk" `hdiutil attach -nomount ram://${SECTORS}`
@carlsverre
carlsverre / README.md
Created February 28, 2012 07:48
Cross Browser Event Framework

Cross Browser Embeddable Event Framework

This provides a simple embeddable event framework for your scripts

The best use case is to embed the function in your script, and assign the result to some internal variable. The default case is to add cbef.addEvent and cbef.removeEvent to the window object.

An example of how I recommend you use it is:

(function() {

@alkos333
alkos333 / gist:1771618
Created February 8, 2012 17:52
Read URL GET variable
// Given a query string "?to=email&why=because&first=John&Last=smith"
// getUrlVar("to") will return "email"
// getUrlVar("last") will return "smith"
// Slightly more concise and improved version based on http://www.jquery4u.com/snippets/url-parameters-jquery/
function getUrlVar(key){
var result = new RegExp(key + "=([^&]*)", "i").exec(window.location.search);
return result && unescape(result[1]) || "";
}
@playpauseandstop
playpauseandstop / wtforms_extended_selectfield.py
Created January 10, 2012 17:39
Add support of optgroups to WTForms' default SelectField class
from wtforms.fields import SelectField as BaseSelectField
from wtforms.validators import ValidationError
from wtforms.widgets import HTMLString, html_params, escape
from wtforms.widgets import Select as BaseSelectWidget
__all__ = ('SelectField', 'SelectWidget')
class SelectWidget(BaseSelectWidget):