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
#!/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 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 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 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 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 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 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'); |
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 | |
# 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 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 WeekTimestamp | |
*/ | |
final class WeekTimestamp | |
{ | |
const SECONDS_IN_MINUTE = 60; | |
const SECONDS_IN_HOUR = self::SECONDS_IN_MINUTE * 60; | |
const SECONDS_IN_DAY = self::SECONDS_IN_HOUR * 24; |
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
#CONFIGS= #in format variable1:value1[,variable2:value2[,...]] | |
#CONFIG_FILE= #path to file | |
echo " | |
#------------------------------------------------------------------------------ | |
# AUTOGENERATED | |
#------------------------------------------------------------------------------ | |
" >> $CONFIG_FILE |
OlderNewer