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 transform_property = (function (el) { | |
var properties = [ | |
'transform', | |
'WebkitTransform', | |
'MozTransform', | |
'msTransform', | |
'OTransform' | |
]; | |
var p; | |
while (p = properties.shift()) { |
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
a(); // -> ? :) | |
var a = function () { | |
console.log('a1'); | |
}; | |
function a() { | |
console.log('a2'); | |
} | |
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
'use strict'; | |
console.log('--------- Scope:'); | |
(function () { | |
var a = 1; | |
for (var a = 0; a < 10; ++a) {} | |
console.log('1.1:', a); // -> 10 |
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
console.log('--------- Hoisting:'); | |
(function () { | |
//console.log('3.1:', a); // -> ReferenceError | |
console.log('3.2:', b); // -> undefined | |
var b = 1; | |
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(b=[],o='',i=c=l=0;u=s[i++];)l<0?u==']'&&l++:(b.push(0),u=='['?(l=b[c]?i-1:-1):u==']'?i=l:u=='.'?o+=b[c]:u=='+'?++b[c]:u=='-'?--b[c]:u=='>'?++c:u=='<'?--c:o) |
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
<?php | |
namespace x; | |
require 'catch_me2.php'; | |
error_reporting(E_ALL | E_STRICT); | |
ini_set('display_errors', 1); | |
try { | |
\y\shittyCode(); | |
} |
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
({ r: window.webkitRequestAnimationFrame }).r(alert.bind(null, 1)); | |
//Uncaught TypeError: Illegal invocation | |
({ r: window.mozRequestAnimationFrame }).r(alert.bind(null, 1)); | |
//Error: Illegal operation on WrappedNative prototype object | |
var r = mozRequestAnimationFrame; | |
r.call(null, alert.bind(null, 1)); | |
//ok, context is not important, so why can't I call DOM methods in whichever I want? :| | |
//because this is DOM! |
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 self(opts) { | |
var SLIDE_WIDTH = 180; | |
console.log(opts); | |
// ble ble ble... | |
if (arguments.length > 1) { | |
self.apply(null, [].slice.call(arguments, 1)); | |
} | |
}( |
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
// I've just found shit like this: | |
var sth = | |
option.type == 't1' | |
? v1 | |
: option.type == 't2' | |
? v2 | |
: option.type == 't3' | |
? v3 | |
: null; |
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
CKTESTER.editor = { config : { autoParagraph : false } }; | |
CKTESTER.test( | |
{ | |
test_a : function() | |
{ | |
var editor = this.editor, | |
editable = editor.editable(); | |
editable.setHtml( 'abcdef' ); |
OlderNewer