Skip to content

Instantly share code, notes, and snippets.

@ErDmKo
ErDmKo / gist:8752000
Created February 1, 2014 12:50
Group process killer
kill -9 $(ps aux | grep RefreshDate | awk '{print $2}')
@ErDmKo
ErDmKo / forms.py
Created February 10, 2014 16:17
Select, radio and checkbox customization django
#change standart widget to choice inputs https://github.com/django/django/blob/master/django/forms/widgets.py#L577
class MyForm(forms.ModelForm):
class Meta:
model = office_models.myForm
fields = ['education', 'occupation', 'post', \
'neighborhood', 'man_count', 'with_animals']
widgets = {
'education': forms.RadioSelect,
'occupation': forms.RadioSelect,
@ErDmKo
ErDmKo / general.css
Created March 26, 2014 08:35
bottom footer feature
.general_cont {
height: auto !important;
min-height: 100%;
height: 100%;
}
.footer {
margin-top: -216px;
padding: 0 30px 0px 30px;
}
$(document).on('click', function(e){
var elem = $(e.target),
contanier =$('.events_list');
if (elem.closest('.events_list').length){
if (elem.is('.open_close')){
contanier.toggleClass('open');}}
else
contanier.removeClass('open');
});
@ErDmKo
ErDmKo / PopUp.js
Created April 4, 2014 08:52
JavaScript poper and slider
function extend(cls, superCls)
{
var construct = function () {};
construct.prototype = superCls.prototype;
cls.prototype = new construct();
cls.prototype.constructor = cls;
var obj = superCls;
cls.index = 0;
cls.extend_array = [obj];
while (typeof obj != 'undefined' && obj.hasOwnProperty('super'))
"""
Django settings for surgut project.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.6/ref/settings/
"""
# XTERM TWEAKS
# ===============================================================
#
#
# Set term to xterm-color
#term screen
term xterm-256color
#term xterm-color
#it is not working
@sql_f = SELECT group_concat(CONCAT("ALTER TABLE ",TABLE_SCHEMA,".",TABLE_NAME," CHARACTER SET utf8 COLLATE utf8_general_ci; ",
"ALTER TABLE ",TABLE_SCHEMA,".",TABLE_NAME," CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ") SEPARATOR '; ')
AS alter_sql
FROM information_schema.TABLES
WHERE TABLE_SCHEMA = 'tc-akvarel_ru';
PREPARE sql FROM @sql_f;
EXECUTE sql;
=decor_pseudo($after)
position: relative
&:#{$after}
content: ''
position: absolute
@content
=keyframes($name)
@-webkit-keyframes #{$name}
@content
@ErDmKo
ErDmKo / carousel.js
Last active August 29, 2015 14:00
carousel