Skip to content

Instantly share code, notes, and snippets.

View acechase's full-sized avatar

Andrew Chase acechase

View GitHub Profile
@gene1wood
gene1wood / batch-delete-gmail-emails.js
Last active March 10, 2024 17:53
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
@acechase
acechase / image optimization instructions
Last active August 29, 2015 13:56
optimize all the jpg's for your (rails or other) application
# This assumes you're using OS X, but should work on any linux-based system
# These two find commands could be run as part of the asset packaging step...
brew install jpegoptim
# checkout disk usage before hand
du -h -d 1 .
# add -n to jpegoptim options to do a dry run
find . -name "*.jpg" -exec jpegoptim --strip-all {} \;
brew install optipng
# .railsrc for Rails 3, encoding: utf-8
# see http://rbjl.net/49-railsrc-rails-console-snippets
if !Rails.application then warn "Rails isn't loaded, yet... skipping .railsrc" else
# # #
def ripl?; defined?(Ripl) && Ripl.instance_variable_get(:@shell); end
# # #
# loggers
class AppBuilder < Rails::AppBuilder
include Thor::Actions
include Thor::Shell
def test
append_test_gems
rspec
cucumber
jasmine
end