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
@Echo Off | |
For /R %%F In (*.class) Do ( | |
jad %%F | |
ren %CD%\%%~nF.jad %%~nF.java | |
move %CD%\%%~nF.java %%~dpF | |
) |
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
{% if pages|length > 1 %} | |
<ul class="page_list"> | |
{% if sel_page > first_rand %} | |
<li><a href="{{ object.get_absolute_url }}{{ get_str }}&page=1">1</a><span>...</span></li> | |
{% endif %} | |
{% for page in pages %} | |
<li><a href="{{ object.get_absolute_url }}{{ get_str }}&page={{ page }}"{% if page == sel_page %} class="sel"{% endif %}>{{ page }}</a></li> | |
{% endfor %} | |
{% if sel_page <= last_rand %} | |
<li><span>...</span> <a href="{{ object.get_absolute_url }}{{ get_str }}&page={{ last }}">{{ last }}</a></li> |
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
insert into orders_useradr | |
select | |
NULL as id, | |
p.user_id as user_id, | |
p.city as adr | |
from | |
orders_userprofile as p; | |
update | |
orders_userprofile, |
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
#server | |
def socketer(s, ...): | |
s.bind(...) | |
s.listen(10) | |
while 1: | |
conn, addr = s.accept() | |
out = (....).encode('zlib') | |
out = str(len(out))+"data_length"+out | |
conn.sendall(out) |
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
var scaleKepper = function(e){ | |
var obj = $(/*selector*/)[0], | |
windowWidth = $(window).innerWidth(), | |
windowHeight = $(window).innerHeight(), | |
aspect = obj.clientWidth/obj.clientHeight, | |
result = windowWidth/aspect > windowHeight ? | |
'width:'+windowWidth+"px;height:"+windowWidth/aspect+"px;margin-top:-"+((obj.clientHeight-windowHeight)/2)+"px;" : | |
'width:'+windowHeight*aspect+'px;height:'+windowHeight+'px;margin-left:-'+((obj.clientWidth-windowWidth)/2)+'px'; | |
obj.setAttribute('style', result); | |
}; |
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
if request.get_host().split(".")[0] == 'www': | |
return HttpResponseRedirect((request.is_secure() and "https" or "http")+ "://"+".".join(request.build_absolute_uri().split(".")[1:])) | |
server { | |
listen 80; | |
server_name www.dom.ru; | |
return 301 $scheme://dom.ru$request_uri; | |
} | |
server { |
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
server { | |
listen 80; | |
server_name www.<domain>; | |
return 301 $scheme://<domain>$request_uri; | |
} | |
server { | |
listen 80; | |
server_name localhost <ip> <domain>; | |
location ~* ^.+\.(xml|html|txt|png|jpg|gif|ico)$ { |
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
;(function($) | |
{ | |
var jqPluginName = 'scheme', | |
Init = function(element, options) | |
{ | |
var config = $.extend(true, {}, $.fn[jqPluginName].defaults, options), | |
self = this, | |
cats_counter = [], | |
create_cav = function() | |
{ |
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
y = MAX*(1-e^-x) |
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 magic | |
with magic.Magic(flags=magic.MAGIC_MIME_TYPE) as m: | |
content_type = m.id_filename(self.file._get_path()) |
OlderNewer