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
#!env bash | |
#https://gist.github.com/paunin/e4f9f01a1cfcfc99828b75d4fd29ac96 | |
# Export files from apple *.photoslibrary (File->Export Unmodified Original) with options "Subfolder Format = Moment Name" | |
# Run the script against the folder where the images were exported. | |
# Subfolders will be renamed from format `{MOMENT_NAME}, d Month YYYY` to `YYYY.mm.dd[{MOMENT_NAME}]` | |
# example: `Da Lat - Phường 8 - Tỉnh Lâm Đồng, 3 May 2016` => 2016.05.03[Da Lat - Phường 8 - Tỉnh Lâm Đồng] | |
DIR=$1 | |
if [[ "$DIR" == "" ]]; then | |
echo "Error: please pass \$1 for directory to organize! " |
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 | |
DOCKER_COMPOSE_FILES='docker-compose1.yml,docker-compose2.yml' | |
DOCKER_COMPOSE_UP_MODE=1 #1|0 | |
DOCKER_COMPOSE_UP_LOG_FILE='/tmp/log.txt' | |
DOCKER_COMPOSE_BUILD_OPTIONS="" #any options for `docker-compose build` | |
DOCKER_COMPOSE_UP_OPTIONS="" #any options for `docker-compose up` | |
DOCKER_COMPOSE_RUN_OPTIONS="" #any options for `docker-compose run` | |
TEST_CONTAINERS="application1=/test.sh,application2=/test2.sh" | |
##### get port remover ##### |
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
SED_EXPR='s/^\([A-Z0-9_]*\)=\(.*\)$/export \1="\2"/g' | |
printenv | sed "$SED_EXPR" > $ENV_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
#CONFIGS= #in format variable1:value1[,variable2:value2[,...]] | |
#CONFIG_FILE= #path to file | |
echo " | |
#------------------------------------------------------------------------------ | |
# AUTOGENERATED | |
#------------------------------------------------------------------------------ | |
" >> $CONFIG_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
#!/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
<?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
<?php | |
require_once(__DIR__.'/vendor/XhProf/xhprof_html/callgraph.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
<!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
#!/bin/sh | |
# @author paunin | |
# @url http://paunin.com | |
# @require jq[http://stedolan.github.io/jq/] | |
# @require curl | |
RM_KEY="" | |
RM_URL="" |
NewerOlder