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
Shadowbox.init({ | |
onFinish : function(az) { | |
var navBtnRight = $("<div/>").addClass('shadowbox-nav shadowbox-next').html($("<a/>") .click(function(){Shadowbox.next();})); | |
var navBtnLeft = $("<div/>").addClass('shadowbox-nav shadowbox-prev').html($("<a/>").click(function(){Shadowbox.previous();})); | |
$("#sb-body-inner").prepend(navBtnRight ) | |
.prepend(navBtnLeft); | |
$('.shadowbox-nav').hover( | |
function() { | |
if( |
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($) { | |
$.fn.myTooltip = function(options) { | |
/** | |
setup default settings | |
*/ | |
var defaults = { | |
closeTipBtn: 'aToolTipClose', | |
closeTipBtnClass: 'tooltip-close', | |
toolTipId: 'aToolTip', | |
toolTipClass: 'tooltip', |
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 hexLighter($hex,$factor = 30) { | |
$new_hex = ''; | |
$hex = str_replace('#', '', $hex); | |
$base['R'] = hexdec($hex{0}.$hex{1}); | |
$base['G'] = hexdec($hex{2}.$hex{3}); | |
$base['B'] = hexdec($hex{4}.$hex{5}); | |
foreach ($base as $k => $v) { |
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
"""sendmail email backend class.""" | |
import threading | |
from django.conf import settings | |
from django.core.mail.backends.base import BaseEmailBackend | |
from subprocess import Popen,PIPE | |
class EmailBackend(BaseEmailBackend): | |
def __init__(self, fail_silently=False, **kwargs): |
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
table = function(code) { | |
var s = 'фисвуапршолдьтщзйкыегмцчня', | |
b = 'ФИСВУАПРШОЛДЬТЩЗЙКЫЕГМЦЧНЯ', | |
c = s.length, | |
A = [], | |
A2 = [], | |
A3 = {91: 'х', 93: 'ъ', 59: 'ж', 39: 'э', 44: 'б', 46: 'ю', 123: 'Х', 125: 'Ъ', 58: 'Ж', 34: 'Э', 60: 'Б', 62: 'Ю'}, | |
T = [], | |
sk = 96, | |
bk = 64; |
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 | |
# -*- coding: utf-8 -*- | |
import os, errno, re, psycopg2 | |
# конфигурация | |
dsn = 'dbname=stiebel user=postgres password=111 port=5434' | |
table = 'menu_router' | |
fields = ['load_functions', 'to_arg_functions', 'access_arguments', 'page_arguments', ] | |
pk = 'path' | |
file = '/web/data.sql' |
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
{% extends "admin/base.html" %} | |
{% load i18n %} | |
{% block extrahead %} | |
<script type="text/javascript" src="/static/ckeditor/ckeditor.js"></script> | |
<script type="text/javascript"> | |
grp.jQuery(function(){ | |
config = { | |
'toolbar': [ | |
[ |
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 secret = $('<div>').attr('id', 'secret-meter'), | |
loadNow = 0, | |
loadTotal = 0; | |
$('body').prepend(secret); | |
$('.dialog').click(function(){ | |
var url = $(this)[0].href, | |
loadWindow = function() { | |
$.nmData(secret.html(), { | |
closeButton: '<a href="#" class="nyroModalClose nyroModalCloseButton nmReposition" title="close"></a>', |
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
def translit(locallangstring): | |
conversion = { | |
u'\u0410' : 'A', u'\u0430' : 'a', | |
u'\u0411' : 'B', u'\u0431' : 'b', | |
u'\u0412' : 'V', u'\u0432' : 'v', | |
u'\u0413' : 'G', u'\u0433' : 'g', | |
u'\u0414' : 'D', u'\u0434' : 'd', | |
u'\u0415' : 'E', u'\u0435' : 'e', | |
u'\u0401' : 'Yo', u'\u0451' : 'yo', | |
u'\u0416' : 'Zh', u'\u0436' : 'zh', |
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
header("Cache-Control: must-revalidate"); | |
header("Pragma: must-revalidate"); | |
header("Content-type: application/vnd.ms-excel; charset=URF-16LE"); | |
header("Content-disposition: attachment; filename=file.csv"); | |
echo chr( 0xFF ) . chr( 0xFE ) . mb_convert_encoding( $content, 'UTF-16LE', 'UTF-8' ); |
OlderNewer