View chrome-search-engine-remove.js
document.querySelectorAll('#other-search-engine-list [selected] .row-delete-button').forEach(function(el) {el.click();})
View phinx-sf2-migrate.php
<?php
use Phinx\Console\PhinxApplication;
use Symfony\Component\Console\Input\ArrayInput;
use Symfony\Component\Console\Output\BufferedOutput;
use Symfony\Component\HttpFoundation\Response;
public function migrateDbAction()
{
$kernel = $this->get('kernel');
View vim-fugitive-shortcuts
# Basic commands
:Git [args] # does what you'd expect
all of your `~/.gitconfig` aliases are available.
:Git! [args] # same as before, dumping output to a tmp file
Moving inside a repo.
View php7-lint.sh
#!/bin/bash
find . -name '*.php' | xargs -i php -l {} | grep -v 'No syntax errors'
View linkcheck.sh
#!/bin/bash
timestamp=$(date +"%Y%m%d%H%M%S")
cd /tmp
time wget -4 --spider -r --delete-after \
--no-cache --no-http-keep-alive --no-dns-cache \
-U "Wget" \
-X/blog \
http://www.example.com -o"/tmp/wget-example-com-$timestamp.log"
View genpls.sh
#!/bin/bash
count=1
echo "[playlist]" > ${PWD##*/}.pls
for v in *.mp4; do
echo "File$count=$v" >> ${PWD##*/}.pls
echo -n "Length$count=" >> ${PWD##*/}.pls
count=$((count+1))
ffprobe -i $v -show_entries format=duration -v quiet -of csv="p=0" >> ${PWD##*/}.pls
done
View localhost-wp-htaccess
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^localhost$
RewriteRule . - [E=REWRITEBASE:/example.com/]
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
View linkchecker-9.3.1.diff
commit eb903c0aff0d2558c709fdc5b8345fbaa505827d
Author: Michal Zuber <info@nevilleweb.sk>
Date: Tue Jul 5 08:10:10 2016 +0200
Added patch to fix error: This program requires Python requests 2.2.0 or later.
diff --git a/PKGBUILD b/PKGBUILD
index 0d5595c..aa978a0 100644
--- a/PKGBUILD
+++ b/PKGBUILD
View .htaccess
Options +FollowSymLinks
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} !current/
RewriteRule (.*) /current/$1 [L]
# http://localhost/example.com
# RewriteRule (.*) /example.com/current/$1 [L]
</IfModule>
View post-receive
#!/bin/bash
target_branch="production"
working_tree="PATH_TO_DEPLOY"
while read oldrev newrev refname
do
branch=$(git rev-parse --symbolic --abbrev-ref $refname)
if [ -n "$branch" ] && [ "$target_branch" == "$branch" ]; then