Skip to content

Instantly share code, notes, and snippets.

View zhunik's full-sized avatar
🏠
Working from home

Yura Zhunkivskyi zhunik

🏠
Working from home
View GitHub Profile
@zhunik
zhunik / settings.json
Created July 24, 2019 12:23
VS Code settings
{
"terminal.integrated.fontFamily": "Meslo LG M for Powerline",
"terminal.integrated.fontSize": 12,
"terminal.external.osxExec": "iTerm.app",
"terminal.integrated.rendererType": "canvas",
"terminal.integrated.scrollback": 10000,
"files.autoSave": "onFocusChange",
"telemetry.enableTelemetry": false,
"telemetry.enableCrashReporter": false,
//advanced new file settings.
@zhunik
zhunik / profile.json
Created October 5, 2018 14:03
iTerm2 profile
{
"Ansi 6 Color" : {
"Blue Component" : "0.6039215999999999",
"Green Component" : "0.5960785",
"Red Component" : "0.02352941"
},
"Tags" : [
],
"Ansi 12 Color" : {
@zhunik
zhunik / docker-compose.yml
Created September 14, 2018 15:12
docker-compose Postgres health-check
version: "3"
services:
postgress:
....
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
app:
@zhunik
zhunik / sVim.rc
Last active September 11, 2018 07:26
sVim settings
let scrollstep = 80
@zhunik
zhunik / post-merge
Last active June 16, 2016 11:57
unzip assets ufter "git pull"
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
check_run() {
echo "$changed_files" | grep --quiet "$1" && eval "$2"
}
check_run assets.zip "unzip -o assets.zip -d ."
@zhunik
zhunik / magento-router-standart
Created June 1, 2016 15:35
Magento route debug. Place this file under "app/code/local/Mage/Core/Controller/Varien/Router/Standart.php" & monitor system.log
<?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
@zhunik
zhunik / git-line-endings
Created June 1, 2016 10:54
Dealing with line endings
git config --global core.autocrlf input
git reset --hard
git add .
git commit -m "Normalize all the line endings"
@zhunik
zhunik / php auth
Created May 9, 2015 21:53
simple php auth
<?php
$valid_passwords = array ("mario" => "carbonell");
$valid_users = array_keys($valid_passwords);
$user = $_SERVER['PHP_AUTH_USER'];
$pass = $_SERVER['PHP_AUTH_PW'];
$validated = (in_array($user, $valid_users)) && ($pass == $valid_passwords[$user]);
@zhunik
zhunik / .gitignore
Last active August 29, 2015 14:19 — forked from salcode/.gitignore
gitignore sample for wp
# -----------------------------------------------------------------
# .gitignore for WordPress @salcode
# ver 20150227
#
# From the root of your project run
# curl -O https://gist.githubusercontent.com/salcode/b515f520d3f8207ecd04/raw/.gitignore
# to download this file
#
# By default all files are ignored. You'll need to whitelist
# any mu-plugins, plugins, or themes you want to include in the repo.