This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="d3"> | |
sdf | |
<p> | |
1231 | |
<a> | |
asdfasdf | |
<div id="d1"> | |
1 | |
</div> | |
</a> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
PATH = os.path.realpath(os.path.dirname(__file__)) | |
if os.environ.get('PYTHONPATH'): | |
from .heroku import * | |
elif os.path.exists(os.path.join(PATH, 'local.py')): | |
from .local import * | |
else: | |
from .base import * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
colorscheme desert | |
set smartindent | |
set tabstop=4 | |
set ruler | |
set nu | |
syntax on | |
set backupcopy=yes | |
set shiftwidth=4 | |
set laststatus=2 | |
set expandtab |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(itemIndex - 1) % COLORS.length |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from lxml import etree | |
root = etree.fromstring(xml_str) | |
def xml2json(self, root): | |
children = root.findall('ResponseData/ResponseDataObject')[0] | |
def recusiv(children): | |
out = {} | |
for child in list(children): | |
if len(list(child)): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vim | |
%s/InnoDB/MyISAM/g | |
g/CONSTRAINT/d | |
%s/)\,\n)/\)\r\)/g | |
SET foreign_key_checks = 0; | |
drop procedure if exists `to_MyISAM`; | |
CREATE PROCEDURE `to_MyISAM` () | |
BEGIN | |
DECLARE a,c VARCHAR(256); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('body').on('click', '.open_close_sel', function(e){ | |
var self = $(this); | |
popup = self.children('dd'), | |
group = self.add(popup); | |
$('.open_close_sel > dd').filter(function(e){ | |
return !$(this).is(popup) | |
}).removeClass('open').closest('.open_close_sel').removeClass('open'); | |
$(document).off('.custom_select').on('click.custom_select', function(e, f){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.on('click', '.carousel .next, .carousel .prev', function(e){ | |
e.preventDefault(); | |
var self = $(this), add_elem = $('<div/>'), | |
slier = self.closest('.carousel').find('ul'), | |
slier_count = slier.find('.js_slide').length - 1, | |
next_pos = (self.is('.next')? 1: -1) | |
+ slier.find('.sel') | |
.removeClass('sel') | |
.index(), | |
width = slier.width(), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=decor_pseudo($after) | |
position: relative | |
&:#{$after} | |
content: '' | |
position: absolute | |
@content | |
=keyframes($name) | |
@-webkit-keyframes #{$name} | |
@content |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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; |
NewerOlder