Skip to content

Instantly share code, notes, and snippets.

@nolar
nolar / gist:1113207
Created July 29, 2011 05:59
sample cover letter (beware: very atypical!)
Hello,
I would like to apply to your XXXXX position. Just take a look at my resume (attached) to see all my experience in the web development field and in Python in particular.
In a nutshell, I have 10 years of experience in webdev, of which last two are in Python+Django. Actually, I am language agnostic, which means that language by itself is not very significant for me -- they are all the same; but platform, paradigm and typical architecture of language-specific solutions could make the difference.
On the one hand, I am very interested in building application architectures, _developing_ them (not just _coding_), and solving the business tasks with use of technology rather tan making the thing just for making them. On the other hand, I like to create some experimental applications for fun if I see a problem (business or real-life) to be solved, and usually these applications spill over into lot of coding with new technologies and techniques. For example, right now I'm working on one of such services for m
@nolar
nolar / mturk-create.py
Created August 11, 2011 09:49
MTurk HIT initiation
import datetime
import boto.mturk.connection
import boto.mturk.question as mtq
import boto.mturk.qualification as mtqu
mt = boto.mturk.connection.MTurkConnection(aws_access_key_id='xxx', aws_secret_access_key='yyy')
text_en = '''Hello!
I am test text message to be translated from English to Russian.
If you ask me, I was born in a mind of a crazy web developer,
who tests the MTurk API to start a very promising service later.
@nolar
nolar / gist:2844428
Created May 31, 2012 16:06
Accidentially found in code
class marva
{
static $l;
static $x;
/**
* Инициализирует на странице
*
* @static
* @param string|false $l параметр l марвы
@nolar
nolar / .bashrc
Created July 27, 2012 18:22
Virtualenv automatic activation
#
# Finds the closest virtualenv root directory, starting from $1, and going up to the root.
# If the target directory is not specified as an argument, current directory is used.
# Prints the virtualenv path found, or nothing otherwise.
#
function venv_find () {
# The cycle is just for the case with broken root folder detection - never do more than N iterations.
venv_root=${1:-"."}
venv_found=""
for (( i=100; i > 0; i-- )); do
@nolar
nolar / hostland-refunds.txt
Last active December 17, 2015 06:38
Как hostland.ru деньги возвращает :-) Изначально было оплачено 1728 руб за год, потреблено ≈6.5 мес, к возврату по математике причитается ≈800 руб.
Здравствуйте.
С условиями возврата Вы можете ознакомиться здесь:
http://hostland.ru/about_money#money_back
На вашем абонентском счете сейчас 1277.17 руб.,
из них 708.02 руб. - денежные бонусы ООО Хостланд, которые не возвращаются.
Оплата 29-10-2012 была произведена пластиковой картой через Masterbank.
При этом ООО Хостланд за свой счет оплатил комиссию в размере 3,5% в Masterbank при осуществлении перевода,
эти денежные средства будут удержаны (1728*3,5%=60,48руб.).
--- WindowlistScreenlet.py.orig 2008-10-27 22:31:14.000000000 +0300
+++ WindowlistScreenlet.py 2008-10-27 23:52:14.000000000 +0300
@@ -28,6 +28,8 @@
import screenlets
from screenlets import DefaultMenuItem
from screenlets.options import BoolOption
+from screenlets.options import StringOption
+from screenlets.options import IntOption
import cairo
import gtk
#
# Print all possible candidates for virtualenv relative to the directory $1.
# Used in venv_find() for every directory starting from the current and up to the root.
#
function venv_candidates () {
echo $1
echo $1/.venv
echo $1/VENV
echo $1/ENV
echo $1.venv
<?xml version="1.0"?>
<root>
<item>
<name>Change F19 to switch language in VMware, Parallels, VirtualBox</name>
<item>
<name style="important">First, remap CapsLock to F19 (code 80) in PCKeyboardHack.</name>
</item>
<item>
@nolar
nolar / Chrome Anywhere.workflow
Created April 20, 2015 17:54
Opens Chrome window on current desktop (useful with hotkeys). If input is turned on, open all selected URLs in the tabs.
on run {input, parameters}
tell application "Google Chrome"
make new window
if input is not {} then
repeat with URL in input
open location URL
end repeat
end if
// Рецепт, как скачать всё состояние биржи WT от https://vk.com/smee_again
// 1. открываем Google Chrome, заходим на ЛЮБУЮ страницу webtransfer (должны быть залогинены)
// 2. заходим в Меню -> Просмотр -> Разработчикам -> Консоль Javascript
// 3. вставляем сюда ВСЁ вот это, жмём ENTER, и ждём несколько секунд:
var PERPAGE=100500,
WT_URL = 'https://webtransfer-finance.com/ru/account/ajax_user/applications_table/1/', // «Дать кредит»
//WT_URL = 'https://webtransfer-finance.com/ru/account/ajax_user/applications_table/2/', // «Получить кредит»
CSV_SEPARATOR=';'; // если в Excel криво отображается табличка, то заменить на «,»
$.post(WT_URL, {"per_page": PERPAGE, "offset": 0, "search": "", "filter": "", "order[id]": "desc"}, function(r) {
var csvContent = [ // это названия столбцов в файле. Можно переименовывать по вкусу: