##MixedTweets
We will see how to mix 2 twitter searches and push the results to the browser in real time.
First, checkout this mini project
To try it, you need to install Play 2.0
###Controller
takeover() { | |
# create a temporary session that displays the "how to go back" message | |
tmp='takeover temp session' | |
if ! tmux has-session -t "$tmp"; then | |
tmux new-session -d -s "$tmp" | |
tmux set-option -t "$tmp" set-remain-on-exit on | |
tmux new-window -kt "$tmp":0 \ | |
'echo "Use Prefix + L (i.e. ^B L) to return to session."' | |
fi |
<?php | |
/* | |
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP) | |
Author: _ck_ (with contributions by GK, stasilok) | |
Version: 0.1.7 | |
Free for any kind of use or modification, I am not responsible for anything, please share your improvements | |
* revision history | |
0.1.7 2015-09-01 regex fix for PHP7 phpinfo | |
0.1.6 2013-04-12 moved meta to footer so graphs can be higher and reduce clutter |
##MixedTweets
We will see how to mix 2 twitter searches and push the results to the browser in real time.
First, checkout this mini project
To try it, you need to install Play 2.0
###Controller
# proze.zsh-theme | |
# Most of this was taken from http://stevelosh.com/blog/2010/02/my-extravagant-zsh-prompt/ | |
# Determine what character to use in place of the '$' for my prompt. | |
function repo_char { | |
git branch >/dev/null 2>/dev/null && echo '☿' && return | |
echo '○' | |
} | |
# Display any virtual env stuff with python. |
<?php | |
/** | |
* This function is free software; you can redistribute it and/or | |
* modify it under the terms of the GNU Lesser General Public | |
* License as published by the Free Software Foundation; either | |
* version 2.1 of the License, or (at your option) any later version. | |
* | |
* This Software is distributed in the hope that it will be useful, | |
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
<?php | |
function genUUID($prefix=null,$maxlength=36) | |
{ | |
$s = strtoupper( | |
hash( | |
'whirlpool',hash('sha1', | |
microtime(true).crypt( | |
uniqid( | |
rand(), | |
true) |
# = Class: site::root_user | |
# | |
# This is a simple class to manage the root user password. | |
# The shadow hash of an existing password can be easily obtained | |
# by running `puppet resource user root` on a Linux system | |
# that has the desired root password already set. | |
# Puppet will then manage this password everywhere. | |
# | |
# First, I set the password to "puppet" on one Linux node and then get back the | |
# shadow hash. |
<?php | |
class ColorCLI { | |
static $foreground_colors = array( | |
'bold' => '1', 'dim' => '2', | |
'black' => '0;30', 'dark_gray' => '1;30', | |
'blue' => '0;34', 'light_blue' => '1;34', | |
'green' => '0;32', 'light_green' => '1;32', | |
'cyan' => '0;36', 'light_cyan' => '1;36', |