Consider this blog post model:
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
| " hide hidden chars | |
| :set nolist | |
| " show hidden characters in Vim | |
| :set list | |
| " settings for hidden chars | |
| " what particular chars they are displayed with | |
| :set lcs=tab:▒░,trail:▓,nbsp:░ | |
| " or |
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
| echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
| . ~/.bashrc | |
| mkdir ~/local | |
| mkdir ~/node-latest-install | |
| cd ~/node-latest-install | |
| curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
| ./configure --prefix=~/local | |
| make install # ok, fine, this step probably takes more than 30 seconds... | |
| curl https://www.npmjs.org/install.sh | sh |
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
| stage { "pre": before => Stage["main"] } | |
| class python { | |
| package { | |
| "build-essential": ensure => latest; | |
| "python": ensure => "2.6.6-2ubuntu1"; | |
| "python-dev": ensure => "2.6.6-2ubuntu1"; | |
| "python-setuptools": ensure => "latest"; | |
| } | |
| exec { "easy_install pip": | |
| path => "/usr/local/bin:/usr/bin:/bin", |
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
| require 'formula' | |
| class Newsbeuter <Formula | |
| url 'http://www.newsbeuter.org/downloads/newsbeuter-2.2.tar.gz' | |
| homepage 'http://www.newsbeuter.org' | |
| md5 '2add1dfe8d3684e67ab75f0c5172c705' | |
| depends_on 'gettext' | |
| depends_on 'stfl' | |
| depends_on 'pkg-config' |
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
| # Example how to add rich editor capabilities to your models in admin. | |
| from django.contrib.admin import site, ModelAdmin | |
| import models | |
| # we define our resources to add to admin pages | |
| class CommonMedia: | |
| js = ( | |
| 'https://ajax.googleapis.com/ajax/libs/dojo/1.6.0/dojo/dojo.xd.js', |
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
| # This is in my .profile, you could also put it in your .bash_profile | |
| feature_deliver() { | |
| CURRENT=`git branch | grep '\*' | awk '{print $2}'` | |
| feature_update | |
| git checkout master | |
| git merge --squash --no-commit ${CURRENT} | |
| git commit | |
| } | |
| feature_update() { |
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
| """ | |
| Example of installing django-taggit onto a Zinnia Entry model | |
| (django-blog-zinnia) which traditionally uses django-tagging. | |
| The django-taggit manager is installed on the tagged_as attribute because | |
| tagged is already taken by the existing django-tagging installation (which we don't remove). | |
| """ | |
| from django.contrib import admin |
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
| # 0 is too far from ` ;) | |
| set -g base-index 1 | |
| # Automatically set window title | |
| set-window-option -g automatic-rename on | |
| set-option -g set-titles on | |
| #set -g default-terminal screen-256color | |
| set -g status-keys vi | |
| set -g history-limit 10000 |
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
| // EntryPoint.js | |
| define(function () { | |
| return function EntryPoint(model1, model2) { | |
| // stuff | |
| }; | |
| }); | |
| // Model1.js | |
| define(function () { | |
| return function Model1() { |