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
def all_subsets(*elements): | |
# ensure elements is indexable and contains only unique values | |
elements = list(set(elements)) | |
# Each bit pattern in an n-bit bitfield corresponds to a unique subset | |
# of an n-element set. Iterate over all such bitfields where | |
# n = len(elements). | |
for permutation_bits in xrange(2**len(elements)): | |
indexes = [ | |
i |
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
class gitolite { | |
group { 'git': | |
ensure => present, | |
system => true, | |
} | |
user { 'git': | |
ensure => present, | |
system => true, | |
gid => git, |
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 logging as l | |
import contextlib as c | |
import os | |
import sys | |
import subprocess as s | |
import urllib as u | |
import urllib2 as u2 |
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
<plugin> | |
<groupId>org.lesscss</groupId> | |
<artifactId>lesscss-maven-plugin</artifactId> | |
<version>1.3.0</version> | |
<executions> | |
<execution> | |
<goals> | |
<goal>compile</goal> | |
</goals> | |
</execution> |
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
<!-- Asadmin setup targets --> | |
<target name="ant.asadmin" depends="ant.asadmin-port"> | |
<!-- This relies on an obnoxious linked list of presetdef tasks to | |
conditionally pass the 'host' and 'port' options to asadmin if and | |
only if the associated properties are set in Ant. --> | |
<presetdef name="asadmin"> | |
<asadmin.port /> | |
</presetdef> | |
</target> |
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
class gitolite { | |
group { 'git': | |
ensure => present, | |
system => true, | |
} | |
user { 'git': | |
ensure => present, | |
system => true, | |
gid => git, |
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
$ ssh dev.example.com cat /etc/apache2/sites-available/git.example.com | |
<VirtualHost *:80> | |
ServerName git.example.com | |
DocumentRoot /usr/share/gitweb | |
<Directory /usr/share/gitweb> | |
Options FollowSymLinks +ExecCGI | |
AddHandler cgi-script .cgi | |
</Directory> |
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
CREATE TEMPORARY TABLE foo_staging LIKE FOO; | |
-- replace with bulk insert if you like | |
\copy into foo_staging [...] | |
INSERT INTO foo | |
SELECT | |
foo_staging.* | |
FROM | |
foo_staging | |
LEFT JOIN foo USING (key, columns, here) |
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 | |
import subprocess as s | |
import optparse as o | |
import urllib2 as u | |
import json as j | |
import re | |
import os | |
import errno |
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
repo @all | |
config hooks.jenkins-url = http://builds.example.com/ | |
config hooks.base-url = [email protected]: | |
config hooks.repository-root = /var/lib/gitolite3/repositories |
OlderNewer