Skip to content

Instantly share code, notes, and snippets.

@aotd1
aotd1 / index.php
Last active May 22, 2019 05:24
Простой генератор названий версий при недельных релизах
<?php
class VersionGenerator {
protected $adjective = [];
protected $noun = [];
protected $seed;
@aotd1
aotd1 / crushimg.sh
Created April 10, 2018 06:26 — forked from caiguanhao/crushimg.sh
Recursively crush/shrink/optimize/losslessly compress PNGs, JPEGs and GIFs.
#!/bin/bash
# This is an improved script of pngfix.sh (https://gist.github.com/404909)
# which can also crush/shrink/optimize/losslessly compress JPEGs and GIFs.
# It is recommended you backup your image files before executing this script.
# Operation will be skipped if output file is bigger in size.
#
# use chmod +x crushimg.sh to make it executable and then ./crushimg.sh to run, or
# bash ./crushimg.sh to run it directly
#
# ./crushimg.sh [FILE] - (default to current directory)

Keybase proof

I hereby claim:

  • I am aotd1 on github.
  • I am aotd (https://keybase.io/aotd) on keybase.
  • I have a public key ASDHCXQjicVm2jPW1Iy-Lxi95MLVJjyoz7vO3YIkPEVXKwo

To claim this, I am signing this object:

@aotd1
aotd1 / PgArrayTrait.php
Last active August 29, 2015 14:23
Yii2 Postgresql array variables trait
<?php
namespace app\components;
use yii\base\InvalidValueException;
/**
* Class PgArrayTrait
* @property string[] $arrayFields
*/
@aotd1
aotd1 / replicate.sh
Created January 19, 2015 13:28
Simple script to start replication on slave postgresql 9.3
#!/bin/bash
PATH="/bin:/sbin:/usr/bin:/usr/sbin"
TARGETDIR=/var/lib/postgresql/9.3/main/
test -z "$1" && { echo 'Please specify argument: source master base host' 2>&1; exit 1; }
service postgresql stop
rm -rf $TARGETDIR