Skip to content

Instantly share code, notes, and snippets.

View Aeon's full-sized avatar
🦴

Anton Stroganov Aeon

🦴
View GitHub Profile
@Aeon
Aeon / ssh-retry.sh
Last active May 4, 2017 07:14 — forked from 9point6/ssh-retry.sh
Keep retrying SSH connection until success (Useful for waiting for VMs to boot)
#!/bin/bash
if [ -z "$1" ]; then
echo '' && echo 'Please also provide server name as in config file...' &&
exit 1
fi
retries=0
repeat=true
today=$(date)
var page = new WebPage(),
address, selector, filename;
var system = require('system');
page.onConsoleMessage = function(msg) {
system.stderr.writeLine('console: ' + msg);
};
//capture and captureSelector functions adapted from CasperJS - https://github.com/n1k0/casperjs
capture = function(targetFile, clips) {
git log --author="`git config user.name`" --shortstat --since=yesterday | egrep 'files? changed' | awk '{files+=$1; inserted+=$4; deleted+=$6} END {print "", files, "files changed,", inserted, "insertions(+),", deleted, "deletions(-)"}'
@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;
--------------------------------------------------------------
--- 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.
@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 *
*********************************************************************/