$ gem i chef --no-ri --no-rdoc
$ knife configure
$ gem i knife-solo --no-ri --no-rdoc
$ knife solo init chef-repo
$ tree chef-repo/
chef-repo/
This file contains hidden or 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
WITH RECURSIVE | |
x(i) AS ( VALUES (0) | |
UNION ALL SELECT i + 1 | |
FROM x | |
WHERE i < 101), | |
Z(Ix, Iy, Cx, Cy, X, Y, I) AS ( | |
SELECT | |
Ix, | |
Iy, | |
X :: FLOAT, |
This file contains hidden or 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 os | |
from django.dispatch import receiver | |
from rosetta.signals import post_save | |
@receiver(post_save) | |
def restart_server(sender, **kwargs): | |
os.system('supervisorctl pid <gunicorn process> | xargs kill -HUP') |
This file contains hidden or 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 openpyxl.workbook import Workbook | |
from openpyxl.writer.excel import ExcelWriter | |
from openpyxl.cell import get_column_letter | |
class XlsLogger(object): | |
""" | |
Save something to a Excel spreadsheet | |
""" | |
def __init__(self): |
This file contains hidden or 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 startcss(): | |
with lcd(r"%s/bin" % local_dir): | |
local("nohup ./checkCss.sh &> /dev/null < /dev/null &") | |
def stopcss(): | |
local("ps -ef | grep \"checkCss\" | grep -v \"grep\" | awk '{print $2}' | xargs kill -9") |
This file contains hidden or 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
#!/bin/bash | |
# License: Public Domain. | |
# Author: Joseph Wecker, 2012 | |
# | |
# -- DEPRICATED -- | |
# This gist is slow and is missing .bashrc_once | |
# Use the one in the repo instead! https://github.com/josephwecker/bashrc_dispatch | |
# (Thanks gioele) | |
# | |
# Are you tired of trying to remember what .bashrc does vs .bash_profile vs .profile? |
This file contains hidden or 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
#!/bin/bash | |
if [ ! -x /usr/bin/chef-solo ]; then | |
echo "ERROR: chef-solo not found" | |
echo "Try the chef-full package, http://opscode.com/chef/install" | |
exit 1 | |
fi | |
BOOTSTRAP_TARBALL="http://osl.marshall.edu/chef/gitlab-bootstrap.tar.gz" |
This file contains hidden or 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
<?php | |
/** | |
* Scrape the number of podcast reviews from iTunes for all country specific storefronts. | |
* | |
* @author Sean Murphy <[email protected]> | |
*/ | |
$podcast_id = '366931951'; // Startups For the Rest of Us | |
//$podcast_id = '318567721'; // techzing |
This file contains hidden or 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
apt-get install -y build-essential libx11-dev libgl1-mesa-dev libxext-dev perl perl-modules make | |
cd /tmp | |
wget http://byte-unixbench.googlecode.com/files/UnixBench5.1.3.tgz | |
tar xzvf UnixBench5.1.3.tgz | |
cd UnixBench | |
./Run | |
NewerOlder