Skip to content

Instantly share code, notes, and snippets.

View UltraBob's full-sized avatar

Bob McDonald UltraBob

  • Kalamuna
  • Maple Ridge, BC, Canada
  • 22:47 (UTC -07:00)
  • LinkedIn in/ultrabob
View GitHub Profile
$view = new view();
$view->name = 'publisher_and_copyright';
$view->description = '';
$view->tag = 'default';
$view->base_table = 'node';
$view->human_name = 'Publisher and Copyright';
$view->core = 7;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
$view = new view();
$view->name = 'publisher_and_copyright';
$view->description = '';
$view->tag = 'default';
$view->base_table = 'node';
$view->human_name = 'Publisher and Copyright';
$view->core = 7;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
company_technologies = db.Table('company_technologies',
db.Column('company_id', db.Integer, db.ForeignKey('companies.id')),
db.Column('technology_id', db.Integer, db.ForeignKey('technologies.id'))
)
class Technology(db.Model):
__tablename__ = 'technologies'
id = db.Column(db.Integer, primary_key=True)
name = db.Column(db.String(128), index=True)
parent_id = db.Column(db.Integer, default=None, nullable=True, index=True)
@UltraBob
UltraBob / vidhunter.py
Last active December 20, 2015 12:29
a script to walk a directory looking for and unpacking compressed files, then find any movie files and pass them to a shell script that passes them through handbrake
#!/usr/bin/python
import os
import subprocess
import sys
from pyunpack import Archive
""" TODO:
Make sure we don't delete files and folders that were added to the folder while we were processing, but were not processed yet themselves.
NOTE: if I decide to make the command line options more complex, look at the aregparse module
"""
@UltraBob
UltraBob / gist:4491133
Created January 9, 2013 06:33
flush dns cache in Lion and Mountain Lion
sudo killall -HUP mDNSResponder