This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
### A simple set of instructions based on my opinions and preference ### | |
# To Begin | |
sudo add-apt-repository ppa:chromium-daily/beta | |
sudo add-apt-repository "deb http://archive.canonical.com/ubuntu natty partner" | |
sudo apt-get -y update && sudo apt-get -y upgrade | |
# Gnome tweaks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
sudo jockey-text -u | |
sudo jockey-text -e xorg:nvidia_current | |
sudo sed -i 's/gb.archive/eu.archive/g' /etc/apt/sources.list | |
# To Begin | |
sudo add-apt-repository ppa:chromium-daily/beta | |
sudo add-apt-repository ppa:nikolay-blohin/gnotran |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import time | |
import subprocess | |
from datetime import datetime | |
LOG_FILE = 'connection.log' | |
def check(ip): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys | |
MONTHS_IN_YEAR = 11 | |
class Age(object): | |
years = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
''' | |
fourdown.py | |
A simple script to grab links to images found on a page. | |
You can use as is for downloading images from thread on 4chan or you can | |
import FourDown and do what ever you want with it. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fuzzy_timesince = function(when) { | |
parts = [ | |
['year', 60 * 60 * 24 * 365], | |
['month', 60 * 60 * 24 * 30], | |
['week', 60 * 60 * 24 * 7], | |
['day', 60 * 60 * 24], | |
['hour', 60 * 60], | |
['minute', 60] | |
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
from base64 import b64encode, b64decode | |
from django.conf import settings | |
ALPHABET = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
class URLEncoder(object): | |
def __init__(self, secret, alphabet=ALPHABET, noise_length=12): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import datetime | |
class Gantt(object): | |
""" Generate and manipulate Gantt charts """ | |
def __init__(self, *args, **kwargs): | |
self.start = kwargs.pop( | |
'start', | |
datetime.datetime.now() - datetime.timedelta(7) | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask, session, redirect, request | |
from tumblpy import Tumblpy | |
app = Flask(__name__) | |
app.config['SECRET_KEY'] = 'x' | |
consumer_key = 'x' | |
consumer_secret = 'x' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.db import models | |
class BaseModel(models.Model): | |
def update(self, **kw): | |
for k, v in kw.items(): | |
setattr(self, k, v) | |
self.save() | |
class Meta: |
OlderNewer