Skip to content

Instantly share code, notes, and snippets.

View Great-Antique's full-sized avatar

Denys Hirnyk Great-Antique

View GitHub Profile
@Great-Antique
Great-Antique / music-mover.php
Created August 28, 2015 16:42
Move music: BandName/01 - Test Name.mp3 -> OneFolder/BandName - 1 - Test Name.mp3
#!/usr/bin/env php
<?php
/*
* Run php ./music-mover.php ../path/to/bands/folder ../path/to/one/folder [-d|--debug]
* DEBUG MODE: echos moving way instead of moving files
*/
function l($text) {
echo "{$text}\n";
@Great-Antique
Great-Antique / git-svn-recursive.sh
Last active August 29, 2015 13:56
Git from SVN clone and sync
#!/bin/bash
### Be sure that you have this option in your ~/.subversion/servers file
### [global]
### http-bulk-updates=on
### init
command=$1
### helpers
@Great-Antique
Great-Antique / parse-svn-authors-file.bash
Created March 6, 2014 14:02
Parse svn authors file for git manipulation like filter-branch
#!/usr/bin/env bash
authorsFile='/path/to/svn.authors'
declare -A authorsArray
IFS=$'\n' authorsStrAll=($(cat $authorsFile))
for authorStr in ${authorsStrAll[@]}
do
echo $authorStr
@Great-Antique
Great-Antique / run-with-skip.bash
Last active August 29, 2015 13:57
Run Codeception tests with skip flag in Bamboo
#!/usr/bin/env bash
if [ $1 == "skip" ]; then
echo "Skip tests"
mkdir -p tests/_log
touch tests/_log/fake_report.xml
printf "<?xml version="1.0" encoding="UTF-8"?>\n<testsuites>\n\t<testsuite name="fake" tests="0" assertions="0" failures="0" errors="0" time="0">\n\t</testsuite>\n</testsuites>" >> tests/_log/fake_report.xml
else
codecept "$@"
fi
# Git visual log displays commit tree view with who did what when and in which branch
git config --global alias.vlog 'log --graph --date-order --date=relative --pretty=format:"%C(cyan)%h: %Cblue - %an - %Cgreen %C(cyan)%ar:%Creset%n%s%n" --color'
@Great-Antique
Great-Antique / run-linkchecker.sh
Last active August 29, 2015 14:03
run linkchecker
linkchecker --ignore-url=\!mysite\.com --file-output=xml/utf_8/PATH/TO/MY/LOG/FILE http://mysite.com/
@Great-Antique
Great-Antique / run-tidy.sh
Created July 7, 2014 14:59
run tidy for a site page from url
wget -qO- localhost:8000 | tidy --tidy-mark n --quiet y 2>&1 | xargs -d"\n" -I line echo line
linklint -http -host localhost:8000 /@ -doc log_dir
webcheck --avoid-external --base-only --output=log http://localhost:8000/ -x /blog -f