This file contains hidden or 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 | |
fromVersion=$1 | |
if [ -d .sql-update ] | |
then | |
start=false | |
for sqlFile in `ls -v .sql-update/*` | |
do | |
if [[ $sqlFile == *$fromVersion* ]] |
This file contains hidden or 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 | |
class EnvStream | |
{ | |
private $var, $position = 0; | |
function stream_open($path, $mode, $options, &$opened_path) | |
{ | |
$this->var = parse_url( $path, PHP_URL_HOST ); | |
return true; |
This file contains hidden or 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
# .bashrc | |
[ -z "$PS1" ] && return |
This file contains hidden or 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 | |
$start = microtime(true); | |
error_log( $start ); | |
// if( !apc_exists( 'xml' )) | |
// { | |
$xml = simplexml_load_file('cpv_2008.xml'); | |
// apc_add( 'xml', $xml ); | |
// } |
This file contains hidden or 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
{capture name="preview"}{$smarty.const.PATH_TO_FILE}unknown.pdf{/capture} | |
{if $smarty.capture.preview|is_file} | |
<embed width="100%" height="100%" name="plugin" src="....." type="application/pdf"> | |
{/if} |
This file contains hidden or 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 | |
/* | |
+----------------------------------------------------------------------+ | |
| APC | | |
+----------------------------------------------------------------------+ | |
| Copyright (c) 2006-2011 The PHP Group | | |
+----------------------------------------------------------------------+ | |
| This source file is subject to version 3.01 of the PHP license, | | |
| that is bundled with this package in the file LICENSE, and is | | |
| available through the world-wide-web at the following url: | |
This file contains hidden or 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
# Steps | |
# 1. Remove tag | |
git tag -d TAGNAME | |
# 2. Push to origin | |
git push origin :refs/tags/TAGNAME | |
# 3. Create tag | |
git tag TAGNAME | |
# 4. Push to origin | |
git push origin |
This file contains hidden or 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
brew install wine winetricks | |
winetricks dotnet20 | |
wget http://keepass.info/download.html (Select KeePass 2 Portable version) | |
wine KeePass-2.28/KeePass.exe |
This file contains hidden or 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
SELECT | |
(substr( email, instr( email, '@') + 1)) as domain, | |
count(*) as total | |
FROM relations | |
GROUP BY domain | |
ORDER BY total DESC; |
This file contains hidden or 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
git rev-list master | head -n 1 |