Project moved here: https://github.com/karolk/temple.js
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
navigator.userAgent.toLowerCase().indexOf("msie 6.")!=-1&&(screen.updateInterval=10000); |
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
eval( | |
auth_pass | |
_0x4 | |
WordPress\.Org | |
5db4c956bb56f6f050412fecd239344f | |
hgerwhu45 | |
maridora | |
strrev | |
base64_decode | |
decrypt |
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
//returns true if [], '', null, undefined | |
//returns false if 0, false, {}, NaN | |
function isEmptyNullUndef(value) { | |
return [value] == ''; | |
} |
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
<h1 data-templ="header"></h1> | |
<ul data-templ="items"> | |
<li> | |
<strong data-templ="strong name"></strong> | |
<a href="#" data-templ="url name"></a> | |
</li> | |
</ul> | |
<p data-templ="empty">The list is empty.</p> |
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
<h1>{{header}}</h1> | |
{{#bug}} | |
{{/bug}} | |
{{#items}} | |
{{#first}} | |
<li><strong>{{name}}</strong></li> | |
{{/first}} | |
{{#link}} | |
<li><a href="{{url}}">{{name}}</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
/* | |
Call certain JS functions in a controlled way by passing the name in the URL. | |
This can be likened to XSS but done in a controlled way | |
#Possible use case | |
Let's assume there is a social networking site having a feature 'invite me for lunch'. | |
Unfortunately the feature is not very well visible in the GUI. Assuming there is a JS | |
function inviteForLunch(ISODate) defined on the page people could create links on their |
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
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 Karol Kowalski <http://github.com/karolk> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
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 ObjectCreate(proto, properties) { | |
var propDesc = {}, p, pd, pdStr, ES5 = !!(Object.create && Object.defineProperties); | |
if (!ES5) { | |
var F = function() {}; | |
F.prototype = proto; | |
var o = new F(); | |
} | |
for (p in properties) { | |
pd = properties[p], pdStr = pd.pd.toLowerCase(); | |
if (ES5) { |
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 time | |
import winsound #only works on windows, any similar APIs on Mac/Linux? | |
def beep_number(number, length=200): | |
#sounds frequencies in hertz, starting from middle C and going up to high E | |
sounds = [261, 294, 330, 350, 392, 440, 494, 523, 587, 659] | |
i=0 | |
while i<len(number): | |
winsound.Beep(sounds[int(number[i])],length) |