Skip to content

Instantly share code, notes, and snippets.

Ilya Sanosyan isanosyan

Block or report user

Report or block isanosyan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@isanosyan
isanosyan / Request.php
Created Jun 22, 2012
Symfony 2: use GET parameter _path to determine route
View Request.php
<?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:2973744
Created Jun 22, 2012
mac os x: disable and enable spotlight
View gist:2973744
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
sudo chmod 600 /System/Library/CoreServices/Search.bundle/Contents/MacOS/Search
killall SystemUIServer
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
sudo chmod 755 /System/Library/CoreServices/Search.bundle/Contents/MacOS/Search
killall SystemUIServer
@isanosyan
isanosyan / gist:3242469
Created Aug 3, 2012
convert video for ipad
View gist:3242469
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 Dec 12, 2015
mac os x: change screenshot location (defaults to desktop)
View gist:4744715
defaults write com.apple.screencapture location /path/
killall SystemUIServer
View самсунг
Собственный софт самсунга написан чужими для хищников.
@isanosyan
isanosyan / two columns
Created Apr 15, 2013
two columns for bilingual docs like contract
View two columns
\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 Jul 3, 2013
mac os x: disable bouncing effect in Dock
View gist:5922633
defaults write com.apple.dock no-bouncing -bool TRUE
killall Dock
View gist:5940408
// 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',
View gist:9466603
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 Jul 29, 2014
git: ignore local changes to tracked files
View .gitconfig
[alias]
ignore = update-index --assume-unchanged
unignore = update-index --no-assume-unchanged
ignored = !git ls-files -v | grep "^[[:lower:]]"
You can’t perform that action at this time.