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 subprocess | |
def mixpanel_log(**kwargs): | |
""" | |
A simple function for asynchronously logging to the mixpanel.com API. | |
This function requires `curl` and Python version 2.4 or higher. | |
@param **kwargs: The parameters for the logging request. For a list of | |
parameters see http://mixpanel.com/api/. | |
@return Instance of L{subprocess.Popen} |
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
"------------------------------------------------------------------------------ | |
" File: $HOME/.vimrc | |
" Author: Uwe Hermann <uwe@hermann-uwe.de> (Mostly) | |
" URL: http://www.hermann-uwe.de/files/vimrc | |
" $Id: .vimrc 331 2005-09-07 21:09:32Z uh1763 $ | |
"------------------------------------------------------------------------------ | |
version 6.3 | |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" | |
"http://www.w3.org/TR/html4/strict.dtd"> | |
<html lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<title>untitled</title> | |
<style type="text/css" media="screen"> | |
#wrapper { | |
border:1px solid; |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |
<head> | |
<title>Let's Go Shopping</title> | |
<link rel="stylesheet" type="text/css" href="/media/style.css"/> | |
</head> | |
<body> | |
<div id="container"> |
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
""" | |
This script assumes the file config.py and optional file config_local.py are in | |
the same directory as this file. Of course, you wouldn't need this if you just | |
had config_local.py exist by default and have it `import * from config` ;) | |
A few tweaks could be made to remove the need to have the `import *` part in | |
config_local.py, basically: | |
def __getattr__(self, name): | |
return getattr(self._mod_local, name) or getattr(self._mod, name) |
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
"------------------------------------------------------------------------------ | |
" File: $HOME/.vimrc | |
" Author: Uwe Hermann <uwe@hermann-uwe.de> | |
" Author: "jhdf" <http://dotfiles.org/~jhdf/.vimrc> | |
" Author: Tom Davis <tom@nydusmedia.com> | |
"------------------------------------------------------------------------------ | |
version 6.3 | |
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"" | |
"http://www.w3.org/TR/html4/loose.dtd"> | |
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8"> | |
<title>Comet Echo!</title> | |
</head> | |
<body> | |
<h1>Comet Echo!</h1> | |
<input type="text" id="message" value="Zoinks!"> <input type="button" value="Echo This!"> |
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 os import path | |
TEMPLATE_DIRS = ( | |
path.join( | |
path.abspath(path.split(__file__)[0]), | |
'templates' | |
), | |
) |
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
BaseDriver(object): | |
implements(INodeDriver) | |
... | |
def create_node(self, image_id, data, ...): | |
params = self.__transform_params(**{image_id, data, ...}) | |
... | |
self.request(action, params, headers=self.__headers(), data=self.__encode_data(data)) | |
def __transform_params(self, **params): | |
""" Override this in provider-specific NodeDriver """ |
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
#!/bin/bash | |
usage='bootstrap.sh -- Bootstrap a profile installation | |
Options: | |
k A key name (Default: "id_dsa") | |
u User name directory (Default: "user") | |
o User home directory (Default: "/home/$u") | |
g Version of git to download (Default: 1.6.4.4) | |
c Profile clone path |
OlderNewer