start new:
tmux
start new with session name:
tmux new -s myname
<?php | |
class importTask extends sfTask | |
{ | |
protected function execute($arguments = array(), $options = array()) | |
{ | |
$xml = simplexml_load_file('file'); | |
$users = array(); | |
foreach ($xml->users as $user) | |
{ |
<?php | |
// &file=`assets/foo/bar.php` indicates the file to include | |
// &return=`1` return explicit content from return statement in included file | |
// default behavior is to use output buffering to capture the content from the include | |
$output = ''; | |
if (isset($file) && file_exists($modx->config['base_path'] . $file)) { | |
if (!isset($return) || $return == false) { | |
ob_start(); | |
include ($modx->config['base_path'] . $file); |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 Jed Schmidt <http://jed.is> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
tell application "System Preferences" | |
set current pane to pane "com.apple.preference.keyboard" | |
end tell | |
tell application "System Events" | |
-- If we don't have UI Elements enabled, then nothing is really going to work. | |
if UI elements enabled then | |
tell application process "System Preferences" | |
get properties | |
<?php | |
$phar = new Phar('twig.phar', 0, 'twig.phar'); | |
$phar->buildFromDirectory(__DIR__ . '/Twig.git/lib'); | |
$phar->compressFiles(Phar::GZ); | |
$phar->setDefaultStub(); |
/*--- waitForKeyElements(): A utility function, for Greasemonkey scripts, | |
that detects and handles AJAXed content. | |
Usage example: | |
waitForKeyElements ( | |
"div.comments" | |
, commentCallbackFunction | |
); |
#!/bin/bash | |
# Cronic v2 - cron job report wrapper | |
# Copyright 2007 Chuck Houpt. No rights reserved, whatsoever. | |
# Amended 2013 Andrew Coulton. | |
# Public Domain CC0: http://creativecommons.org/publicdomain/zero/1.0/ | |
# Basic usage, to run a task and discard the output unless it fails or outputs to STDERR | |
# cronic /run/my/task | |
# |
// Just before switching jobs: | |
// Add one of these. | |
// Preferably into the same commit where you do a large merge. | |
// | |
// This started as a tweet with a joke of "C++ pro-tip: #define private public", | |
// and then it quickly escalated into more and more evil suggestions. | |
// I've tried to capture interesting suggestions here. | |
// | |
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_, | |
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant, |
Suppose you have, by mistake, added your IDE's project folder (you know, these .idea
folders with all kinds of local paths and configuration data and settings in it) to the Git repository of your project. (We're talking about a whole folder here, but the same rules apply to individual files as well.)
Of course, you only realize that two days after the fact and have already pushed it, and your colleagues have already pulled it. They use the same IDE as you do, so whenever they change a setting or fix paths, they can either