Skip to content

Instantly share code, notes, and snippets.

View antonydevanchi's full-sized avatar
💭
I may be slow to respond.

Anton Piskunov antonydevanchi

💭
I may be slow to respond.
View GitHub Profile
@antonydevanchi
antonydevanchi / deploy.sh
Created September 15, 2014 19:55
Simple deploy script
#!/bin/bash
DEPLOY_REPO="git@github.com:<user>/<rep>.git"
DEPLOY_BRANCH="<branch>"
DEPLOY_REVISION_FILE="<path>/last_revision"
DEPLOY_LOCAL_REPO="<path>/deploy"
DEPLOY_DATE_PREFIX=`date +%Y-%m-%d`
# Generate revision number
@antonydevanchi
antonydevanchi / sendmailTest.php
Created January 27, 2013 22:04
Простой скрипт для проверки корректности установки почтовика.
<?php
mail('address@mail.tld', 'Тема письма', 'Тело письма', 'From: no-reply@yourdomain.tld');
?>
data:text/html, <style type="text/css">.e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div class="e" id="editor"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("editor");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script>
<!--
For other language: Instead of `ace/mode/ruby`, Use
Markdown -> `ace/mode/markdown`
Python -> `ace/mode/python`
C/C++ -> `ace/mode/c_cpp`
Javscript -> `ace/mode/javascript`
@antonydevanchi
antonydevanchi / JSON.php
Last active December 12, 2015 09:28
Recursive version CJSON for Yii
<?php
/**
* Recursive version CJSON
*
* @url http://yiiframework.ru/forum/viewtopic.php?f=3&t=6997&p=62655#p62655
* @author (anton44eg from yiiframework.ru) and Anton Smile42RU Piskunov
*/
class JSON extends CJSON
{
server {
listen 80;
server_name localhost;
root /home/website/web;
rewrite ^/app\.php/?(.*)$ /$1 permanent;
try_files $uri @rewriteapp;
location @rewriteapp {
@antonydevanchi
antonydevanchi / AtomVerticalTabs.md
Created March 9, 2017 21:36 — forked from jasesmith/AtomVerticalTabs.md
Vertical file tab list in Atom

Vertical File Tabs in Atom

Add the styles to the .atom/styles.less stylesheet in Atom.

Atom Vertical File Tabs

@antonydevanchi
antonydevanchi / gist:45ce8ea43832d85f3121f1102ca13e30
Last active March 14, 2017 01:21
Laravel Custom Environment and Configuration Load
/*
|--------------------------------------------------------------------------
| Custom Environment and Configuration Load
|--------------------------------------------------------------------------
|
| First of all, we need read what exactly environment we will service.
| If near us we have .env file, than we can read it from it.
|
| After that we expose environment name by variable and
| ask one of $app's methods load configuration params for us.
# EN: Debian-based shells, but may works with other systems.
# RU: Debian-based скрипты, но может работать и на других системах.
# EN: Get path to folder where placed all installed PHP modules.
# RU: Получить путь до папки где лежат все установленные PHP модули.
php -i | grep extension_dir | sed -n "s/^.*=>\s*\(\S*\)$/\1/p"
# EN: Prestissimo override default Composer installer behavior and will install
all Composer dependencies in parallel. Installation time great reduced.
@antonydevanchi
antonydevanchi / kerberos_setup.md
Created April 18, 2018 18:31 — forked from ashrithr/kerberos_setup.md
Set up kerberos on Redhat/CentOS 7

Installing Kerberos on Redhat 7

This installation is going to require 2 servers one acts as kerberos KDC server and the other machine is going to be client. Lets assume the FQDN's are (here cw.com is the domain name, make a note of the domain name here):

  • Kerberos KDC Server: kdc.cw.com
  • Kerberos Client: kclient.cw.com

Important: Make sure that both systems have their hostnames properly set and both systems have the hostnames and IP addresses of both systems in

@antonydevanchi
antonydevanchi / JIRA.properties
Created May 26, 2018 19:22 — forked from iods/JIRA.properties
JIRA Gist for Properties - Defaults
# This file contains defaults for application properties
#
# The keys must match up with the keys found in APKeys.java
#
# NB - the values in this file are not automatically
# handed to the application. The special call
# ApplicationProperties().getDefaultBackedString()
# will return the values in this file if they are not found
# in the database