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
Test | |
<?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
git 3386 ############################################################ | |
cd 1580 ############################ | |
ssh 958 ################# | |
ls 670 ############ | |
vi 367 ####### | |
sudo 352 ####### | |
n98-magerun.phar 220 #### | |
cat 218 #### | |
php 170 #### | |
cmc 150 ### |
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 | |
class AM_PHPUnit_Db_Adapter_Mock implements Varien_Db_Adapter_Interface | |
{ | |
public function beginTransaction() {} | |
public function commit() {} | |
public function rollBack() {} | |
public function newTable($tableName = null, $schemaName = null) {} | |
public function createTable(Varien_Db_Ddl_Table $table) {} | |
public function dropTable($tableName, $schemaName = 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/bash | |
# Call from a folder with downloaded CSV files from Amazon.de credit card banking | |
# clears "fake bookings" to not cause problems during import to Hibiscus | |
sed '/AMAZON.DE PUNKTE/d' * -i | |
sed '/AMAZON.DE GUTSCHEIN/d' * -i |
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
; Output links compatible with the PHPStorm Remote Call plugin running on the host. | |
; source: https://github.com/computerminds/parrot/pull/20/files | |
xdebug.file_link_format="javascript:var rq = new XMLHttpRequest(); rq.open(\"GET\", \"http://localhost:8091?message=%f:%l\", true); rq.send(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
PACKAGE=postfix | |
debconf-get-selections | grep $PACKAGE >> $PACKAGE.debconf | |
apt-get purge $PACKAGE | |
# later / on another machine | |
debconf-set-selections < `dirname $0`/$PACKAGE.debconf | |
apt-get install -y $PACKAGE |
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
aptitude install -y git curl python-dev python-pip redis-server ruby1.9.1-full rubygems1.9.1 libxml2 libxml2-dev libxslt-dev libpq-dev | |
aptitude install -y mysql-server libmysqlclient-dev | |
adduser --system --shell /bin/sh --gecos 'git version control' --group --disabled-password --home /home/git git | |
adduser --disabled-login --gecos 'gitlab system' gitlab | |
usermod -a -G git gitlab | |
su - gitlab | |
ssh-keygen -q -N '' -t rsa -f /home/gitlab/.ssh/id_rsa | |
aptitude install gitolite | |
cp /home/gitlab/.ssh/id_rsa.pub /home/git/gitlab.pub | |
su - git |
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 | |
/** | |
* @Then /^take a screenshot of "([^"]*)" and save "([^"]*)"$/ | |
*/ | |
public function takeAScreenshotOfAndSave($selector, $filename) | |
{ | |
$this->saveScreenshot($filename, '/tmp'); | |
$pos = $this->getSession()->evaluateScript('$$("' . $selector . '").first().getBoundingClientRect();'); |
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
git clone repo-backup/ repo-min | |
cd repo-min/ | |
# make sure you do not have other branches | |
git filter-branch --tree-filter 'rm -rf public/media/*' HEAD | |
git update-ref -d refs/original/refs/heads/master | |
git remote rm origin | |
git repack -ad | |
du -hs .git # 2.4 GB | |
git whatchanged # check that files are not there | |
git reflog expire --expire=now --all |
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
// connected sliders | |
sliders = []; | |
$('.bxslider-detail').each(function() { | |
sliders[$(this).attr('data-id')] = $(this).bxSlider({ | |
mode: 'horizontal', | |
speed: 1000, | |
slideWidth: 400, | |
auto: true, | |
pager: false, | |
infiniteLoop: true |
OlderNewer