Skip to content

Instantly share code, notes, and snippets.

function parseq(s) {
var o = {};
s.split("&").map(function (e) {
var
p = e.indexOf("="),
t = [e.substring(0, p), e.substring(p + 1)],
m = /^(\w+)\[['"](\w+)['"]\]$/.exec(t[0]);
if (m) {
o[m[1]] = o[m[1]] || {};
@m1el
m1el / out.json
Created June 27, 2012 11:19
JScript madness
[{
"type": 0,
"hmenu": 66707,
"id": 121,
"submenu": [{
"type": 256,
"hmenu": 66709,
"id": 122,
"submenu": 0,
"text": "&Изменить атрибуты..."
F = '86670S050s0Sp`0Js5)LxeT0)0C0.Rsh,Jfc02020.RsiW090,Rsh:00T#*jge0bRQQdxKhvs0QQC00b9l)Wfc0pw`00S0C0Sg[%ege%S00cg[ j-Dsts0SJfc0S\n$qtud0TbR$\n+.0)*ZgV0)JWeT0sIRcgK0/Xfb4\\v'.split(0);
f = "`00000000spring00000000`00000000is0in0the0air0000000write0here00000000000000000";
for (Z in a)
a[Z[0] + (Z[6] || Z[2])] = a[Z];
W = c.width = 375;
H = c.height = 500;
Z = b.bgColor = 12;
with(a) {
L = function (d, h, g, e) {
ba();
@m1el
m1el / youtube-dl-map.coffee
Last active December 14, 2015 13:08
youtube dl links
fmt_map = ytplayer.config.args.url_encoded_fmt_stream_map.split(',').map (e) ->
e.split('&').reduce (p, c) ->
c = c.split('=')
p[c[0]] = unescape(c[1])
p
, {}
dl_map = fmt_map.reduce (p, c) ->
p["#{c.quality}/#{c.type}"] = "#{c.url}&signature=#{c.sig}"
p
<img/src/onerror=alert(1)>
@m1el
m1el / timeNN.js
Last active December 15, 2015 09:09
// time07
(function (e) {
"use strict";
function t() {
this.data = {}
}
function n() {
this.listeners = new t
}
@m1el
m1el / manifest.json
Created March 27, 2013 20:02
another google search nospy
{
"manifest_version": 2,
"content_scripts": [ {
"js": [ "script.js" ],
"matches": [
"http://*.google.com/*", "https://*.google.com/*",
"http://*.google.com.ua/*", "https://*.google.com.ua/*",
"http://*.google.ru/*", "https://*.google.ru/*"
]
} ],
@m1el
m1el / fork-with-recursive-check.js
Last active December 17, 2015 22:49
Deep object clone without recursion with recursion objects check
var fork = function (source, unsafe) {
var
objmap = unsafe ? null : new Map(),
targetOut = {__proto__: source.__proto__},
target,
stack = {0: {source: source, target: targetOut}},
sp = 0,
ss = 1,
keys, key, j, scope, tmp;
while ((scope = stack[sp++])) {
@m1el
m1el / cp1251-query.js
Last active December 18, 2015 08:49
#query #cp1251 #encoder
// License = MIT
var encodeCp1251 = (function(){
var alphabet = 'АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя';
function replacefn(c) {
var i = alphabet.indexOf(c);
if (i > -1) {
return '%' + (i + 0xc0).toString(16);
}
if (c.charCodeAt(0) < 128) {
return escape(c);
if (!Object.keys) {
Object.keys = function(obj) {
var keys = [];
for (var k in obj) {
if (obj.hasOwnProperty(k)){
keys.push(k);
}
}
return keys;
}