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 |
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
HISTSIZE=1000000000 | |
HISTFILESIZE=2000000000000000 | |
HISTTIMEFORMAT="[%F %T %Z] " |
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
import RPi.GPIO as GPIO | |
import time | |
from subprocess import call | |
GPIO.setmode(GPIO.BCM) | |
GPIO.setwarnings(False) | |
# GPIO definieren | |
REED_gas = 3 # GPIO 3 (Pin 5) | |
GPIO.setup(REED_gas, GPIO.IN, pull_up_down=GPIO.PUD_UP) |
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
class Activity extends Model | |
{ | |
/** | |
* Convert a string to ASCII | |
* | |
* @source http://cubiq.org/the-perfect-php-clean-url-generator | |
* @param $str | |
* @param array $replace | |
* @param string $delimiter |
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
## Prompt | |
export PROMPT_COMMAND=__prompt_command # Func to gen PS1 after CMDs | |
function __prompt_command() { | |
local EXIT="$?" # This needs to be first | |
PS1="" | |
local RCol='\[\e[0m\]' | |
local Red='\[\e[0;31m\]' |
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 ### |
OlderNewer