Skip to content

Instantly share code, notes, and snippets.

View readevalprint's full-sized avatar
🤠
code is life

Tim readevalprint

🤠
code is life
View GitHub Profile
@readevalprint
readevalprint / login_to_mozillians.py
Created May 1, 2012 22:01
Simple Webdriver & BrowserID login example for Mozillians
#!/usr/bin/env python
# To run this make sure you have selenium and bidpom
# pip install -U selenium
# git clone git://github.com/davehunt/bidpom.git
from selenium import webdriver
from bidpom.browser_id import BrowserID
browser = webdriver.Firefox()
browser.get('http://mozillians.allizom.org')
@readevalprint
readevalprint / models.py
Created May 16, 2012 20:46
EmailAddress class
EMAIL_TYPE_CHOICES = (
('work', 'Work'),
('home', 'Person'),
('other', 'Other'),
)
class EmailAddress(models.Model):
email = models.EmailField(db_index=True, max_length=254, unique=True)
# Allows us to remove the choices and be backwards compatible
type = models.CharField(max_length=10, choices=EMAIL_TYPE_CHOICES)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="generator" content="CoffeeCup HTML Editor (www.coffeecup.com)">
<meta name="dcterms.created" content="Mon, 29 Oct 2012 22:24:36 GMT">
<meta name="description" content="">
<meta name="keywords" content="">
<title>Banana 1.1.1</title>
@readevalprint
readevalprint / _service.md
Last active November 8, 2016 16:05 — forked from naholyr/_service.md
Sample /etc/init.d script

Sample service script for debianoids

Look at LSB init scripts for more information.

Usage

Copy to /etc/init.d:

# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)