Skip to content

Instantly share code, notes, and snippets.

View andmetoo's full-sized avatar
🌊
Working from home

Radik Ilin andmetoo

🌊
Working from home
View GitHub Profile

Keybase proof

I hereby claim:

  • I am andmetoo on github.
  • I am andmetoo (https://keybase.io/andmetoo) on keybase.
  • I have a public key ASDJ6yBHp16dwGd8dlAjM7tmWBTAEn1jFZjf_GeVFaUYcwo

To claim this, I am signing this object:

@andmetoo
andmetoo / Install.txt
Created April 3, 2019 05:31 — forked from soderlind/Install.txt
macOS DoH! (DNS over HTTPS) using cloudflared
1) Install cloudflared using homebrew:
brew install cloudflare/cloudflare/cloudflared
2) Create /usr/local/etc/cloudflared/config.yaml, with the following content
proxy-dns: true
proxy-dns-upstream:
- https://1.1.1.1/dns-query
- https://1.0.0.1/dns-query
@andmetoo
andmetoo / pre-commit
Created September 12, 2018 10:24
Git pre commit php cs fixer from vendor
#!/usr/bin/env bash
echo "pre commit hook start"
CURRENT_DIRECTORY=`pwd`
GIT_HOOKS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
PROJECT_DIRECTORY="$GIT_HOOKS_DIR/../.."
cd $PROJECT_DIRECTORY;
@andmetoo
andmetoo / prepare-commit-msg
Last active April 24, 2019 18:10
add branch name to commit message
#!/bin/bash
# This way you can customize which branches should be skipped when
# prepending commit message.
if [ -z "$BRANCHES_TO_SKIP" ]; then
BRANCHES_TO_SKIP=(master beta test)
fi
BRANCH_NAME=$(git symbolic-ref --short HEAD)
BRANCH_NAME="${BRANCH_NAME##*/}"
@andmetoo
andmetoo / redis.sh
Created July 28, 2017 07:08
Install Redis on Ubuntu
# Install Redis
sudo apt-add-repository ppa:chris-lea/redis-server
sudo apt-get update
sudo apt-get install redis-server
#uninstall Redis
sudo apt-get purge--auto-remove redis-server
@andmetoo
andmetoo / chmod.sh
Created July 28, 2017 07:08
Rewrite web data directory chmod
sudo chown -R www-data:www-data /var/www
sudo chmod -R g+rw /var/www
adduser grigory
su grigory
mkdir .ssh
chmod 700 .ssh
cd .ssh
@andmetoo
andmetoo / backup.sh
Created July 28, 2017 07:06
Mysql backup crontab
0 */6 * * * mysqldump --single-transaction --lock-tables=false -ubackup -pxp3VG9QceKMPdHYQXLqLbfigmKbn storm_pd1 | gzip -c | ./snapshot storm_pd1.sql.gz > ~/storm_pd1_dump.log
@andmetoo
andmetoo / php.sh
Created July 28, 2017 07:05
Uubntu install php
# VERSION 5
sudo apt-get install php5-cli php5-common php5-mysql php5-gd php5-fpm php5-cgi php-pear php5-mcrypt -y
sudo apt-get install php5-mongo php5-geoip php5-curl php5-memcache php5-memcached php5-redis php5-tidy -y
# version 7
sudo apt-get install php7.0-cli php7.0-common php7.0-mysql php7.0-gd php7.0-fpm php7.0-cgi php-pear php7.0-mcrypt -y
sudo apt-get install php7.0-curl -y
@andmetoo
andmetoo / resize.sh
Created July 28, 2017 07:00
Batch resize images on mac
sips -Z 1024 *.jpg --out /Users/metoo/Images/sample
@andmetoo
andmetoo / no-select.css
Created July 28, 2017 06:58
Disable element select only css
.no-select {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}