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
# in web browser | |
# http://uec-images.ubuntu.com/releases/karmic/release/ | |
# canonical karmic 64-bit AMI: | |
# ami-55739e3c | |
# canonical karmic 32-bit AMI: | |
# ami-bb709dd2 | |
# https://console.aws.amazon.com/ec2/home#c=EC2&s=Instances | |
# Launch Instance > Community AMIs |
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
#!/usr/bin/python | |
import os | |
import random | |
import time | |
os.system("osascript -e 'set volume 1' 2>/dev/null"); | |
phrases = ("Help me, I'm stuck in here!", "Is anyone out there?", "Can anybody hear me?", "S O S", "It's dark in here..", "I'm watching you", "Please don't look at me like that", "Don't touch me there!", "What are you doing?", "Who are you?", "I know what you're typing...", "I wouldn't say that if I were you..") | |
voices = ("Zarvox", "Fred", "Ralph", "Victoria", "Princess", "Alex") |
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
function getPageHistory() { | |
var hist = $.cookie('history'); | |
try { | |
hist = JSON.parse(hist); | |
if (false == $.isArray(hist)) hist = []; | |
} | |
catch (e) | |
{ |
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
<div class="campaign-property-container"> | |
<div class="campaign-property-value"> | |
<? if ($Campaign->started()): ?> | |
<? if ($Campaign->running()): ?> | |
<span class="campaign-status mod-running">Running</span> | |
<? elseif ($Campaign->ended()): ?> | |
<span class="campaign-status mod-ended">Ended</span> | |
<? elseif ($Campaign->pending()): ?> | |
<span class="campaign-status mod-scheduled">Scheduled</span> | |
<? 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
<?php namespace App\Http\Middleware; | |
use Closure; | |
class NoCache { | |
/** | |
* Handle an incoming request. | |
* | |
* @param \Illuminate\Http\Request $request |
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 callable_test.php | |
bool(false) | |
bool(true) | |
<?php | |
class Test { | |
public function __invoke() {} | |
} | |
var_dump(is_callable('Test')); |
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
function closureify(callable $fn) | |
{ | |
return function() use ($fn) { | |
return call_user_func_array($fn, func_get_args()); | |
}; | |
} |
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
$ mysql -e 'show slave status \G' -u root | grep "Running: No" | |
$ echo $? | |
1 | |
$ mysql -e 'show slave status \G' -u root | grep "Running" | |
Slave_IO_Running: Yes | |
Slave_SQL_Running: Yes | |
$ echo $? | |
0 |
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
"autoload": { | |
"classmap": [ | |
"database" | |
], | |
"psr-4": { | |
"app\\": "app/" | |
}, | |
"files": [ | |
"app/helpers/helpers.php" | |
] |
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
var React= require('react/addons'); | |
var Router = require('react-router'); | |
var AppConstants = require('../../constants/AppConstants'); | |
var GroupActionCreators = require('../../actions/GroupActionCreators'); | |
var Link = Router.Link; | |
module.exports = React.createClass({ | |
mixins: [Router.Navigation], |