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
" 'apprentice_blue.vim' -- Vim color scheme. | |
" Author: Arnaud Le Blanc | |
" Description: Based on the 'apprentice' color scheme | |
" MADE-UP NAME HEX RGB XTERM ANSI | |
" ======================================================================== | |
" almost black #1c1c1c rgb(28, 28, 28) 234 0 | |
" darker grey #262626 rgb(38, 38, 38) 235 background color | |
" dark grey #303030 rgb(48, 48, 48) 236 8 | |
" grey #444444 rgb(68, 68, 68) 238 8 |
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 ${1:`substitute(substitute(expand("%:h"), '\v^\w+\/(\u)', '\1', ''), '\/', '\\\', 'g')`}; | |
class ${2:`Filename('', 'myClass')`} | |
{ | |
${3} | |
} |
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
" ftplugin/php.vim | |
if !exists("*s:JumpToTest") | |
function s:isTestFile() | |
return expand("%s") =~ "/Tests/.*Test.php$" | |
endfunction | |
function s:testFile() | |
if s:isTestFile() | |
return expand("%") |
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 Doctrine\ORM\Event\OnClearEventArgs; | |
use Gedmo\Tool\Wrapper\AbstractWrapper; | |
/** | |
* Register the listener with $em->getEventManager()->addEventListener('onClear', new ClearListener()) | |
*/ | |
class ClearListener | |
{ |
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
Assign $a *1(!2(1)) NULL dim:NULL property:NULL | |
Assign $b *4(!5(2)) NULL dim:NULL property:NULL | |
Add $a $b *8(!9) | |
PrintOp *8(!9) NULL *10(!11) | |
ReturnOp NULL NULL NULL |
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/sh | |
# to use, save this file as .git/hooks/pre-commit in your git repo | |
# make sure to add execute permissions using: chmod +x .git/hooks/pre-commit | |
command -v pngcrush >/dev/null 2>&1 || { | |
echo "\033[1mPlease install pngcrush to reduce images size before commit\033[0m" | |
echo "Install pngcrush with the following:" | |
echo "\t \033[1mbrew install pngcrush\033[0m" | |
echo "OR" | |
echo "\t Site: \033[1m\033[4mhttp://pmt.sourceforge.net/pngcrush/\033[0m" | |
echo "\t Download: \033[1m\033[4mhttp://sourceforge.net/projects/pmt/files/\033[0m" |
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 | |
/** | |
* Twig REPL hack | |
* | |
* Arnaud Le Blanc <[email protected]> | |
*/ | |
require 'lib/Twig/Autoloader.php'; | |
Twig_Autoloader::register(); |
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 | |
protected function flushQueue() | |
{ | |
$container = $this->getContainer(); | |
$transport = $container->get('mailer')->getTransport(); | |
$spool = $transport->getSpool(); | |
$spool->flushQueue($container->get('swiftmailer.transport.real')); |
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
/ -------------------------------------------------- | |
/ when value is false (or null), attr isn't rendered | |
/ -------------------------------------------------- | |
%input(type="checkbox" checked=false) | |
%div(class=(false ? false : "test")) | |
/ <input type="checkbox" /> | |
/ <div></div> |
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/env python | |
import subprocess | |
import re | |
orig = subprocess.check_output(["/usr/local/bin/html2haml"]) | |
result = orig | |
result = re.sub(r' ', ' ', result) |
NewerOlder