Skip to content

Instantly share code, notes, and snippets.

View bryanveloso's full-sized avatar

Bryan Veloso bryanveloso

View GitHub Profile
@bryanveloso
bryanveloso / puppet.txt
Created January 4, 2011 08:37
Links I've found while studying the world of Puppet.
http://about.digg.com/blog/master-puppets-2-speaking-language
http://agiletesting.blogspot.com/2009/11/automated-deployments-with-puppet-and.html
http://articles.itecsoftware.com/linux/install-and-configure-puppet-client-on-ubuntu-10-10
http://articles.itecsoftware.com/linux/install-and-configure-puppet-server-puppetmaster-on-ubuntu-10-10
http://bitfieldconsulting.com/puppet-and-mysql-create-databases-and-users
http://blog.credativ.com/en/2010/03/howto-introduction-to-puppet.html
http://blog.kumina.nl/2010/11/puppet-tipstricks-running-apt-get-update-only-when-needed/
http://en.gentoo-wiki.com/wiki/Puppet (the "User" portion)
http://evolvingweb.ca/story/controlling-your-cloud-puppet
http://library.linode.com/application-stacks/puppet/automation
// copy+paste this into your browser's javascript
// console on any site running jQuery
// kicking the machine
setInterval(function(){
// picking the monkey's nose
$('p, a, span, label, title, legend, h1, h2, h3, h4, h5, h6').each(function(){
// putting on my pah pah pah poker face

Gist Clients

Want to create a Gist from your editor, the command line, or the Services menu? Here's how.

Editor Support

Campfire client

A simple campfire client similar to Propane for OSX.

Wanted Features

  • Ability to stay logged into multiple rooms with unread counts
  • Noise / notification when people mention my name or listed aliases (Kyle, kneath, etc)
  • Upload / paste in images
  • Username completion
@bryanveloso
bryanveloso / general_python_reqs.txt
Created March 19, 2010 09:34 — forked from toastdriven/general_python_reqs.txt
The Python packages I install globally.
cherrypy
coverage
Cython
python-dateutil
distribute
docutils
eventlet
fabric
greenlet
gunicorn
@bryanveloso
bryanveloso / pip.conf
Created March 10, 2010 21:15 — forked from jezdez/pip.conf
Sample pip configuration file.
[global]
default-timeout = 60
respect-virtualenv = true
download-cache = /tmp
log-file = /tmp/pip-log.txt
[install]
find-links =
http://pypi.pinaxproject.com
http://pypi2.pinaxproject.com
We couldn’t find that file to show.
"Memcached cache backend"
from django.core.cache.backends import memcached
from django.utils.encoding import smart_unicode, smart_str
MIN_COMPRESS_LEN = 150000
class CacheClass(memcached.CacheClass):
def add(self, key, value, timeout=None, min_compress_len=MIN_COMPRESS_LEN):
if isinstance(value, unicode):
#!/usr/bin/env python
"""
Run Django Tests with full test coverage
This starts coverage early enough to get all of the model loading &
other startup code. It also allows you to change the output location
from $PROJECT_ROOT/coverage by setting the $TEST_COVERAGE_OUTPUT_DIR
environmental variable.
"""
/* Use this to cause a function to fire no more than once every 'ms' milliseconds.
For example, an expensive mousemove handler:
$('body').mouseover(ratelimit(function(ev) {
// ...
}, 250));
*/
function ratelimit(fn, ms) {
var last = (new Date()).getTime();