This file contains 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
for i in */; | |
do | |
tar -cvjf "${i%/}.tar" "$i"; | |
done |
This file contains 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
04cd1de7985c2346c0003ee18bf9d0df40e007a7151cb5167e926fbf88c24a0c046b4bf5ebaa7438f33cc3e0f0afc479bd2487a76015d808744e8fc179592b89e1 |
This file contains 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
function isMonoPage(docId, page) { | |
var res; | |
$scope.orderedDocs.forEach(function(doc) { | |
if (doc._id.$oid === docId) { | |
if (doc.pages.indexOf(page) >= 0) { | |
res = true; | |
} else if (doc.color_pages.indexOf(page) >= 0) { | |
res = false; | |
} | |
} |
This file contains 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
var rights_id = db.getCollection('right').find({}, {_id:1}).map(function(item){ return item._id; }) | |
db.getCollection('virtual_reading_room_group').update( | |
{}, | |
{$push: {rights: {$each: rights_id}}} | |
); | |
////////////////////////// | |
db.getCollection('right').remove({"is_template": true}); |
This file contains 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
# coding=utf-8 | |
import imaplib | |
import os | |
import email | |
import base64 | |
from datetime import datetime | |
from importlib import import_module | |
from email.header import decode_header |
This file contains 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
$(function() { | |
oscar.init(); | |
var $hrefs = ['#tab-child', '#tab-adult']; | |
$hrefs.map(function($link){ | |
$('a[href='+$link+']').click(function(e) { | |
e.preventDefault(); | |
$hrefs.map(function($$link) { |
This file contains 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
#!/usr/bin/python | |
import os | |
import sys | |
import subprocess | |
def create_vhost(site_name, site_folder): | |
conf_string = """<VirtualHost *:80> | |
ServerName {0} | |
ServerAdmin webmaster@localhost |
This file contains 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
#!/usr/bin/python3 | |
import os | |
import shutil | |
music = os.path.join('/', 'home', 'stan', 'music') | |
def fdeleter(dir): | |
for folder in os.listdir(dir): | |
path = os.path.join(dir, folder) |
This file contains 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
/*CategoryController*/ | |
public static function searchCorrection($key) | |
{ | |
$keyboardLayout = array('`' => 'ё', 'q' => 'й', 'w' => 'ц', 'e' => 'у', 'r' => 'к', 't' => 'е', 'y' => 'н', 'u' => 'г', 'i' => 'ш', 'o' => 'щ', 'p' => 'з', '[' => 'х', ']' => 'ъ', 'a' => 'ф', 's' => 'ы', 'd' => 'в', 'f' => 'а', 'g' => 'п', 'h' => 'р', 'j' => 'о', 'k' => 'л', 'l' => 'д', ';' => 'ж', "'" => 'э', 'z' => 'я', 'x' => 'ч', 'c' => 'с', 'v' => 'м', 'b' => 'и', 'n' => 'т', 'm' => 'ь', ',' => 'б', '.' => 'ю', '/' => '.', '1' => '1', '2' => '2', '3' => '3', '4' => '4', '5' => '5', '6' => '6', '7' => '7', '8' => '8', '9' => '9', '0' => '0'); | |
$replace = array('0'=>'7', '1'=>'5', '2'=>'1', '3'=>'8', '4'=>'0', '5'=>'2', '6'=>'9', '7'=>'3', '8'=>'4', '9'=>'6'); | |
$decodedArticleKeyChars = array(); | |
$articleKeyChars = str_replace('а', '', str_replace('f', '', $key)); |
This file contains 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
protected function getPartners() { | |
$partnersRaw = Yii::app()->db->createCommand()->selectDistinct | |
('ct.name as category_name, | |
mt.name as manufacturer_name, | |
c.url as category_url, | |
m.url, m.id, | |
p.url as product_url, | |
p.id as product_id') | |
->from('StoreCategoryTranslate ct') | |
->join('StoreCategory c', 'c.id=ct.object_id') |
NewerOlder