Running a masterless salt-minion lets you use salt's configuration management for a single machine. It is also useful for testing out state trees before
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
set :path_to_repo, "/path_to_repo/" | |
set :running_app_user, "appusername" | |
namespace :webscale do | |
desc "Cache a signed out version of the path. Usage: cap webscale:signed_out_cache_page -s path_to_cache=/films/on_netflix" | |
task :signed_out_cache, roles: :app do | |
cache_base_path = "#{path_to_repo}/public/signed_out" | |
cached_destination_path = "#{cache_base_path}#{path_to_cache}.html" | |
working_path = "#{cached_destination_path}.tmp" |
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 | |
# install homebrew's official php tap | |
brew tap josegonzalez/homebrew-php | |
# install homebrew-dupes (required to install zlib, php54's dependency) | |
brew tap homebrew/dupes | |
# install nginx + mysql + php 5.4 + php-fpm + apc + xdebug | |
brew install nginx mysql |
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
<?php | |
/** | |
* This script is meant to be executed via crontab. | |
* It should help you easily set li3 commands as cron jobs. | |
* | |
* You should put this in the root of your application. | |
* However, you don't need to, but you would then need to | |
* pass a --path= option with the path to your app. | |
* This is because the li3 console command must be called | |
* from a specific location. |
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
" Vim color file | |
" Maintainer: Mehdi Lahmam B. (mehlah) | |
" Inspired by Li3 color scheme - http://dev.lithify.me/lithium/wiki/about/visual-identity | |
set background=dark | |
highlight clear | |
if exists("syntax_on") | |
syntax reset | |
endif |
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
use lithium\action\Dispatcher; | |
//Allow admin continuation routes to be made. | |
Dispatcher::config( | |
array( | |
'rules' => array( | |
'admin' => array('action' => 'admin_{:action}') | |
) | |
) | |
); |
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
<?php | |
/** | |
* A System model to work with MongoDB from a higher level. | |
* This model will executes various commands as well as store new commands. | |
* The system.js collection is used. | |
* | |
* Warning: There be dragons in here. | |
* | |
*/ | |
namespace app\models; |
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
<?php | |
use lithium\net\http\Media; | |
/** | |
* This re-maps your template paths so you can have stuff like `pages/users_{username}.php` | |
* instead of the Lithium default. | |
*/ | |
Media::type('html', 'text/html', array( | |
'view' => 'lithium\template\View', |
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
$('a.reveal').click(function(event) { | |
event.preventDefault(); | |
var $div = $('<div>').addClass('reveal-modal').appendTo('body'), | |
$this = $(this); | |
$.get($this.attr('href'), function(data) { | |
return $div.empty().html(data).append('<a class="close-reveal-modal">×</a>').reveal(); | |
}); | |
}); |