Source: http://willandorla.com/will/2011/01/convert-folder-into-git-submodule/
$ git clone --no-hardlinks original-repo copied-repo
--- | |
- hosts: foo | |
tasks: | |
- name: single line plain style | |
file: path=/tmp/foo state=touch | |
- name: multi line plain style | |
file: path=/tmp/foo | |
state=absent |
route delete 0.0.0.0 | |
set INTERFACE=11 | |
set ROUTER=192.168.12.1 | |
route add 0.0.0.0 MASK 0.0.0.0 %ROUTER% IF %INTERFACE% | |
netsh interface ip set dns %INTERFACE% static %ROUTER% register=primary validate=no | |
netsh interface ip add dns %INTERFACE% 212.48.193.36 index=2 no | |
netsh interface ip add dns %INTERFACE% 8.8.8.8 index=3 no |
#I usually drop something like this into my virtualenv's postactivate for some | |
#quick and handy shortcuts to common Django commands. | |
#This way dropping in to do some work on any arbitrary project is as easy as: | |
# 1. workon <project name> | |
# 2. djr | |
cd /path/to/site/root | |
#Django command shortcuts | |
alias dj='python manage.py' |
from dateutil import tz | |
from jinja2 import Undefined | |
client_timezone = tz.gettz('PST8PDT') # timezone to translate to | |
@app.template_filter() | |
def dateformat(value, format=None, rebase=True): | |
if value is None or isinstance(value, Undefined): | |
return '' |
#!/bin/bash | |
# | |
# Elapsed time. Usage: | |
# | |
# t=$(timer) | |
# ... # do something | |
# printf 'Elapsed time: %s\n' $(timer $t) | |
# ===> Elapsed time: 0:01:12 | |
# | |
# |
1. Open regedit | |
2. Navigate to "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\" | |
3. Change IPEnableRouter to 1 | |
4. Run services->Routing and Remote->start | |
(reboot may be nessesary) |
#!/usr/bin/env python | |
""" | |
Insert data into HBase with a Python script. | |
To create the table, first use the hbase shell. We are going to create a | |
namespace called "sample_data". The table for this script is called "rfic", | |
as we will be inserting Request for Information Cases from the City of | |
Indianapolis. |
#!/usr/bin/env python2.7 | |
import time | |
_URL = 'http://localhost/tmp/derp.html' | |
_NUMBER = 1000 | |
def test_urllib2(): | |
import urllib2 |
@echo off | |
cygwin-shim.bat /bin/ansible-galaxy %* |
Source: http://willandorla.com/will/2011/01/convert-folder-into-git-submodule/
$ git clone --no-hardlinks original-repo copied-repo