Skip to content

Instantly share code, notes, and snippets.

http {
map $http_user_agent $limit_bots {
default '';
~*(google|bing|yandex|msnbot) $binary_remote_addr;
}
limit_req_zone $limit_bots zone=bots:10m rate=1r/m;
server {
@isanosyan
isanosyan / .gitconfig
Created July 29, 2014 18:48
git: ignore local changes to tracked files
[alias]
ignore = update-index --assume-unchanged
unignore = update-index --no-assume-unchanged
ignored = !git ls-files -v | grep "^[[:lower:]]"
@isanosyan
isanosyan / Request.php
Created June 22, 2012 07:40
Symfony 2: use GET parameter _path to determine route
<?php
namespace Package\MyBundle\Component\HttpFoundation;
use Symfony\Component\HttpFoundation\Request as BaseRequest;
/**
* Represents HTTP request.
* Replaces actual path with GET _path parameter (if present)
*
@isanosyan
isanosyan / gist:3242469
Created August 3, 2012 00:16
convert video for ipad
ffmpeg -i test.flv -vcodec mpeg4 -b 512k -acodec aac -strict experimental -ac 2 -ab 256k -ar 44100 test.mp4
@isanosyan
isanosyan / gist:4744715
Last active December 12, 2015 08:29
mac os x: change screenshot location (defaults to desktop)
defaults write com.apple.screencapture location /path/
killall SystemUIServer
Собственный софт самсунга написан чужими для хищников.
@isanosyan
isanosyan / two columns
Created April 15, 2013 09:00
two columns for bilingual docs like contract
\begin{table}[ht]
\begin{minipage}[t]{0.45\linewidth}
This is the first column.\\
This is still in the first column.
\end{minipage}
\hspace{0.5cm}
\begin{minipage}[t]{0.45\linewidth}
@isanosyan
isanosyan / gist:5922633
Created July 3, 2013 20:43
mac os x: disable bouncing effect in Dock
defaults write com.apple.dock no-bouncing -bool TRUE
killall Dock
// requirejs config in main.js
require.config({
paths: {
jquery: 'components/jquery/jquery',
es5shim: 'components/es5-shim/es5-shim',
es5sham: 'components/es5-shim/es5-sham'
},
map: {
'*': {
'flight/component': 'components/flight/lib/component',
@isanosyan
isanosyan / gist:a69947d434f3bfa4c3ea
Created February 3, 2016 16:59
list of features for InQuest VM
* files sharing
* ability to import DB from dev
* needs to be accessible with a hostname specified in `/etc/hosts`