Skip to content

Instantly share code, notes, and snippets.

View Aeon's full-sized avatar
🦴

Anton Stroganov Aeon

🦴
View GitHub Profile
@Aeon
Aeon / httpd-vhost.conf
Created February 12, 2013 22:31
sample httpd-vhost.conf
#
# Use name-based virtual hosting.
#
NameVirtualHost *:80
NameVirtualHost *:81
<VirtualHost *:81>
# optional
@Aeon
Aeon / pick_banner.js
Last active December 11, 2015 22:08 — forked from istro/foobar
ads = [
{width: 1000, height:500},
{width: 200, height:200},
{width: 600, height:750},
{width: 600, height:600}
];
screen_ratio = window.document.width / window.document.height;
minimum_area = window.document.width * window.document.height * 0.8;
@Aeon
Aeon / bla.js
Created November 30, 2012 01:29
js refactoring...
var should_reset = false;
if (condition1) {
alert(1);
}else if (condition2) {
alert(2);
should_reset = true;
}else if (condition3) {
alert(3);
should_reset = true;
@Aeon
Aeon / gist:2054750
Created March 17, 2012 03:39
psql drop function definitions
SELECT 'DROP FUNCTION ' || quote_ident(ns.nspname) || '.' || quote_ident(proname) || '(' || oidvectortypes(proargtypes) || ');'
FROM pg_proc INNER JOIN pg_namespace ns ON (pg_proc.pronamespace = ns.oid)
WHERE ns.nspname = 'my_messed_up_schema' order by proname;
@Aeon
Aeon / convert.sh
Created October 6, 2011 01:15
convert file comments from cyrillic to unicode
mkdir conv;
find . -type f -name '*.php' -exec bash -c 'iconv -f windows-1251 -t utf-8 "{}" > ./conv/"{}"' \;
--------------------------------------------------------------
--- When filling out the review form please mind
--- the following rules:
--- (1) Lines beginning with "---" are comments.
--- Do not start lines in your review with ---
--- as they will be ignored. You can add comments to the
--- review form or remove them.
--- (2) Lines beginning with "***" are used by the system. Do not
--- remove or modify these lines or the review will become
--- unusable and will be rejected.
Image.class_eval do
attachment_definitions[:attachment][:styles] = {
:thumb => '60x90',
:mini => '100x150',
:small => '220x330>',
:product => '340x510>',
:large => '860x860>' }
end
server {
listen *:80;
server_name nt.nyxcouture.com;
server_name nikatang.com;
location / {
root /var/www/vhosts/nikatang/current;
index index.php index.html index.htm;
}
@Aeon
Aeon / README.markdown
Created May 7, 2010 11:55 — forked from grosser/README.markdown
git-stats

Ever wondered how much who adds/removes, its time to find out :D (those are real stats, i just obfuscated the names )

###Results

Git scores (in LOC):
mr-add              :  +482273       -9466
justu               :  +286250       -159905
grosser             :  +152384       -323344

another : +121257 -82116

@Aeon
Aeon / 960gs.less
Created March 1, 2010 07:41 — forked from Artanis/960gs.less
LessCSS and 960gs don't play well together normally. Here's the definitions for 960gs to let LessCSS work with it. Looks like we can pull all grid data out of the HTML.
/**
* A LessCSS version of the 960 Grid System
*
* http://lesscss.org/
* http://960.gs/
*/
/*********************************************************************
* Settings *
*********************************************************************/