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 re | |
RU = ( | |
u'ёыъэ', | |
u'а,a;б,b;в,v;г,g;д,d;е,e;ё,yo;ж,zh;з,z;и,i;' | |
u'й,y;к,k;л,l;м,m;н,n;о,o;п,p;р,r;с,s;т,t;' | |
u'у,u;ф,f;х,h;ц,c;ч,ch;ш,sh;щ,shh;ъ,\";ы,y;ь,\';' | |
u'э,e;ю,yu;я,ya' |
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
#!/bin/bash | |
# | |
# Dropbox Uploader Script v0.7 | |
# | |
# Copyright (C) 2010-2011 Andrea Fabrizi <[email protected]> | |
# | |
# This program is free software; you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation; either version 2 of the License, or | |
# (at your option) any later version. |
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
data_uri = open("sample.png", "rb").read().encode("base64").replace("\n", "") | |
img_tag = '<img alt="sample" src="data:image/png;base64,{0}">'.format(data_uri) | |
print img_tag |
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
clear(); | |
var t = $x('//*[@class="play_btn"]/input'); | |
// var t = $$('div#post-23141788_12015 input[type=hidden]'); | |
var ec=''; | |
for(var i=0;i<t.length;i++) | |
{ | |
var str=t[i].value; | |
ec+=' '+str.substring(0,str.length-4); | |
} | |
console.log(ec); |
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 w=$$('input[type=checkbox]'); | |
for(var i=0;i<w.length;i++){w[i].checked=true}; | |
$$('#remove-selected')[0].disabled=false;$$('#remove-selected')[0].click(); |
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
String.prototype.translit = (function(){ | |
var L = { | |
'А':'A','а':'a','Б':'B','б':'b','В':'V','в':'v','Г':'G','г':'g', | |
'Д':'D','д':'d','Е':'E','е':'e','Ё':'Yo','ё':'yo','Ж':'Zh','ж':'zh', | |
'З':'Z','з':'z','И':'I','и':'i','Й':'Y','й':'y','К':'K','к':'k', | |
'Л':'L','л':'l','М':'M','м':'m','Н':'N','н':'n','О':'O','о':'o', | |
'П':'P','п':'p','Р':'R','р':'r','С':'S','с':'s','Т':'T','т':'t', | |
'У':'U','у':'u','Ф':'F','ф':'f','Х':'Kh','х':'kh','Ц':'Ts','ц':'ts', | |
'Ч':'Ch','ч':'ch','Ш':'Sh','ш':'sh','Щ':'Sch','щ':'sch','Ъ':'"','ъ':'"', | |
'Ы':'Y','ы':'y','Ь':"'",'ь':"'",'Э':'E','э':'e','Ю':'Yu','ю':'yu', |
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 | |
#!/usr/bin/env python | |
""" spaceless middleware | |
MIDDLEWARE_CLASSES += ('core_utils.middleware.SpacelessMiddleware',) | |
""" | |
from django.conf import settings | |
from django.utils.html import strip_spaces_between_tags | |
import re |
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
# Numerous always-ignore extensions | |
*.diff | |
*.err | |
*.orig | |
*.log | |
*.rej | |
*.swo | |
*.swp | |
*.zip | |
*.vi |
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
# use glob syntax. | |
syntax: glob | |
# use glob syntax. | |
syntax: glob | |
# Numerous always-ignore extensions | |
*.diff | |
*.err | |
*.orig |
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
//You should use the [XHR Object][1], aka the "AJAX" method. | |
//[Here's an overview][2] as to how to start using it. | |
//Here's an excerpt: | |
// [1]: https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest | |
// [2]: https://developer.mozilla.org/en/docs/AJAX | |
function makeRequest(url, callback) { | |
if (window.XMLHttpRequest) { // Mozilla, Safari, ... | |
httpRequest = new XMLHttpRequest(); |
OlderNewer