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
#CONFIGS= #in format variable1:value1[,variable2:value2[,...]] | |
#CONFIG_FILE= #path to file | |
echo " | |
#------------------------------------------------------------------------------ | |
# AUTOGENERATED | |
#------------------------------------------------------------------------------ | |
" >> $CONFIG_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
SED_EXPR='s/^\([A-Z0-9_]*\)=\(.*\)$/export \1="\2"/g' | |
printenv | sed "$SED_EXPR" > $ENV_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
<?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 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 | |
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 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
#!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! " |
OlderNewer