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
fileext_from_url(url, default_ext = "mp3") | |
{ | |
url_wo_query := RegExReplace(url, "(\?.*)?(#.*)?$", "") | |
SplitPath, url_wo_query, , , , fn | |
return, % fn "." ext_from_url(url, default_ext) | |
} | |
ext_from_url(url, default = "mp3") | |
{ |
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
// url deobfuscation function '129' from audioplayer.js | |
(function(t, i) { | |
"use strict"; | |
function e(t) { | |
if (~t.indexOf("audio_api_unavailable")) { | |
var i = t.split("?extra=")[1].split("#"), | |
e = o(i[1]); | |
if (i = o(i[0]), !e || !i) return t; | |
e = e.split(String.fromCharCode(9)); |
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 getXmlHttp(){ | |
var xmlhttp; | |
try { | |
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); | |
} catch (e) { | |
try { | |
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); | |
} catch (E) { | |
xmlhttp = false; | |
} |
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 | |
ini_set('mbstring.language', 'Russian'); | |
function db(){ | |
static $db = null; | |
if(!$db){ | |
$db = new SQLite3(__DIR__.'/contacts2.db'); | |
$db->busyTimeout(60*60*1000); |
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
/* | |
* OrientationChange Event Shim | |
* http://github.com/richtr | |
* | |
* Copyright (c) 2012, Rich Tibbett | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* |
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 | |
$f = fopen('ttv.all.iproxy.m3u', 'r'); | |
$i = 0; | |
$name = $folder = null; | |
while(($s = fgets($f)) !== false){ | |
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
// click 'see more' | |
[].map.call(document.querySelectorAll('a.fss'), function(a){ a.click(); }); | |
// get texts | |
[].map.call(document.querySelectorAll('.UFICommentActorAndBody'), function(d){ return d.querySelector('.UFICommentActorName').innerText+' пишет: '+d.querySelector('.UFICommentBody').innerText; }).join("\r\n\r\n") |
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 | |
/** | |
* | |
* @param string $url | |
* @param integer $i | |
* @param array $userdata compact('data_type', 'prefix', 'data')) | |
*/ | |
protected function saveImageToYandexDisk(&$url, $i, $userdata = array()){ | |
static $config = null; | |
static $yandex_disk_client = 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
#!/usr/bin/expect -f | |
set domain [lindex $argv 0] | |
set www_root [lindex $argv 1] | |
spawn /root/certbot/letsencrypt-auto certonly --manual -d $domain | |
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 | |
/* | |
$port = 9050; | |
$proxy_score = new shmop_arr('x', 4*1024); | |
$proxy_score[$port] = isset($proxy_score[$port]) ? $proxy_score[$port]+1 : 1; |