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
#!/usr/bin/php | |
<?php | |
$cs = 'phpcs'; | |
$md = 'phpmd'; | |
$output = []; | |
$return = 0; | |
$defaultCsStandard = 'PSR2'; | |
$defaultMdRules = 'codesize,cleancode,controversial,unusedcode,naming,design'; | |
$gitRoot = exec('git rev-parse --show-toplevel', $output); |
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/sh | |
# PHP CodeSniffer pre-receive hook for git | |
#exit 0 #if you want to skip all validation | |
PHPCS_BIN="phpcs" | |
PHPCS_CODING_STANDARD="PSR2" | |
TMP_DIR=$(mktemp -d phpcs-pre-receive-hook.XXXXXXXX) | |
mkdir "$TMP_DIR/source" |
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 | |
# http://stackoverflow.com/questions/8730514/chaining-git-hooks | |
# author: orefalo | |
hookname=`basename $0` | |
FILE=`mktemp` | |
trap 'rm -f $FILE' EXIT | |
cat - > $FILE |
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 | |
#Simple playlist generator m3u | |
#@author paunin | |
OLDIFS=$IFS | |
IFS=$'\n' | |
rm -rf playlists | |
mkdir playlists | |
find $1 -maxdepth 1 -type d | while read dir | |
do |
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/sh | |
# driver script to run multiple update "hooklets". Each "hooklet" performs a | |
# specific (possibly site-local) check, and they *all* have to succeed for the | |
# push to succeed. | |
# HOW TO USE: | |
# (1) rename this file to remove the .sample extension | |
# (2) make the renamed file executable (chmod +x) |
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/sh | |
# @author paunin | |
# @url http://paunin.com | |
# @require jq[http://stedolan.github.io/jq/] | |
# @require curl | |
RM_KEY="" | |
RM_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
<!DOCTYPE html> | |
<html> | |
<head lang="en"> | |
<meta charset="UTF-8"> | |
<title></title> | |
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.26/angular.min.js"></script> | |
<script src="https://code.angularjs.org/1.2.26/angular-route.js"></script> | |
<script src="app.js"></script> | |
</head> | |
<body ng-app="app2"> |
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 | |
require_once(__DIR__.'/vendor/XhProf/xhprof_html/callgraph.php'); |
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 | |
namespace Compare; | |
/** | |
* нужно написать программу которая сравнивает два текстовых файла (терабайтных) | |
* и выводит в третий файл строки, которые есть в первом, но нет во втором. | |
* | |
* To run this utility just run `php ./Compare.php input_file1.txt input_file2.txt output_file.txt` | |
*/ | |
class Compare |
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
#!/usr/bin/env php | |
<?php | |
// http://ocramius.github.io/blog/automated-code-coverage-check-for-github-pull-requests-with-travis/ | |
$inputFile = $argv[1]; | |
$percentage = min(100, max(0, (int) $argv[2])); | |
if (!file_exists($inputFile)) { | |
throw new InvalidArgumentException('Invalid input file provided'); | |
} | |
if (!$percentage) { | |
throw new InvalidArgumentException('An integer checked percentage must be given as second parameter'); |
OlderNewer