Skip to content

Instantly share code, notes, and snippets.

View IlyaSemenov's full-sized avatar

Ilya Semenov IlyaSemenov

View GitHub Profile
@toioski
toioski / guide.md
Created November 2, 2016 20:16
Import OVA/OVF virtual machine to Parallels Desktop
  1. Open OVA/OVF file with VirtualBox
  2. Right click the virtual machine and select 'Clone'
  3. Import the generated .vbox file with Parallels Desktop
@tomfun
tomfun / plural.js
Created August 23, 2016 12:31
JavaScript russian plural function
function getNoun(number, one, two, five) {
let n = Math.abs(number);
n %= 100;
if (n >= 5 && n <= 20) {
return five;
}
n %= 10;
if (n === 1) {
return one;
}
@specialunderwear
specialunderwear / meta.py
Last active July 22, 2019 12:12
Override model fields of an abstract model baseclass in django, by removing them from the abstract model.
def AbstractClassWithoutFieldsNamed(cls, *excl):
"""
Removes unwanted fields from abstract base classes.
Usage::
>>> from oscar.apps.address.abstract_models import AbstractBillingAddress
>>> from koe.meta import AbstractClassWithoutFieldsNamed as without
>>> class BillingAddress(without(AbstractBillingAddress, 'phone_number')):
... pass
@martinrusev
martinrusev / cron_supervisord.ini
Last active June 1, 2024 03:27
Cron supervisord
[supervisord]
nodaemon=true
loglevel=debug
[program:amon]
command=gunicorn -c gunicorn.conf.py wsgi
directory=/amon
autostart=true
autorestart=true
redirect_stderr=true
@maxp
maxp / kladr-psql
Created November 17, 2014 04:11
Конвертация КЛАДР (классификатор адресов России) в формат sqlite.
!READ FIRST!
http://sqlite.mobigroup.ru/wiki?name=sqlite3-dbf
http://sqlite.mobigroup.ru/wiki?name=sqlite3-kladr
Orig: http://www.opennet.ru/tips/2862_postgresql_kladr.shtml
@tbrianjones
tbrianjones / free_email_provider_domains.txt
Last active November 15, 2024 08:56
A list of free email provider domains. Some of these are probably not around anymore. I've combined a dozen lists from around the web. Current "major providers" should all be in here as of the date this is created.
1033edge.com
11mail.com
123.com
123box.net
123india.com
123mail.cl
123qwe.co.uk
126.com
150ml.com
15meg4free.com
@bfoz
bfoz / fixup_committer_date.sh
Created September 7, 2010 19:24
Force GIT_COMMITTER_DATE = GIT_AUTHOR_DATE
git filter-branch --env-filter 'export GIT_COMMITTER_DATE="$GIT_AUTHOR_DATE"'