Skip to content

Instantly share code, notes, and snippets.

# taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/
# generate server.xml with the following command:
# openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes
# run as follows:
# python simple-https-server.py
# then in your browser, visit:
# https://localhost:4443
import BaseHTTPServer, SimpleHTTPServer
import ssl
@jaredwilli
jaredwilli / gist:5469626
Last active May 10, 2025 18:14
HTML5 Canvas Performance and Optimization Tips, Tricks and Coding Best Practices

HTML5 canvas Performance and Optimization Tips, Tricks and Coding Best Practices With canvas being still very new to internet, and no signs of it ever getting old that I can see in the future, there are not too many documented best practices or other really important tips that are a must know for developing with it in any one particular place. Things like this are scattered around and many times on lesser known sites.

There's so many things that people need to know about, and still so much to learn about, so I wanted to share some things to help people who are learning canvas and maybe some who already know it quite well and am hoping to get some feedback from others about what they feel are some best practices or other tips and tricks for working with canvas in HTML5.

I want to start off with one I personally found to be quite a useful yet surprisingly uncommon thing for developers to do. Indent your code Just as you would any other time, in any other language whatever the case may be. It has been a best p

@eric1234
eric1234 / README.md
Last active December 11, 2015 22:08
S3 - Set permissions public on all files in a bucket using IronWorker.

Purpose

Workers to ensure all objects in a S3 bucket have the 'public-read' canned ACL permission. Designed to work with iron.io's IronWorker product to use it's scalable workers to set the permissions quickly and afforably.

Setup

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@alebruck
alebruck / stackscript.sh
Created April 26, 2011 14:13 — forked from cl4rk3/stackscript.sh
Linode Stackscript for Ubuntu 10.10 w/java/groovy/grails
#!/bin/bash
echo deb http://archive.canonical.com/ubuntu maverick partner >> /etc/apt/sources.list
echo deb-src http://archive.canonical.com/ubuntu maverick partner >> /etc/apt/sources.list
echo >> /etc/apt/sources.list
echo deb http://archive.canonical.com/ubuntu maverick-updates partner >> /etc/apt/sources.list
echo deb-src http://archive.canonical.com/ubuntu maverick-updates partner >> /etc/apt/sources.list
echo >> /etc/apt/sources.list
echo deb http://archive.canonical.com/ubuntu maverick-security partner >> /etc/apt/sources.list
echo deb-src http://archive.canonical.com/ubuntu maverick-security partner >> /etc/apt/sources.list
# selenium-webclient does not clean up cookies unless your currently on that page.
module CookieRemover
def self.delete_all(path)
Capybara.current_session.driver.visit(path)
Capybara.reset_sessions!
end
end
After("@external-site") do
CookieRemover.delete_all("http://www.external-site.com")