Skip to content

Instantly share code, notes, and snippets.

// удалить все точки продаж в интерфейсе яндекс.маркет
var s = $("input[name=secret-key]").val();
var id = $("input[name=id]").val();
$.each( $("input[name=outlet-id]"), function( key, value ) {
var oid = $(value).val();
var a = {
"secret-key": s,
outletId: oid,
id: id,
function getBetween($string, $start = "", $end = "", $include_start_end=false){
$pos1 = strpos($string, $start);
if($pos === false) return '';
$apos1 = $pos1+strlen($start);
$pos2 = strpos($string, $end, $apos1);
$apos2 = $pos2+strlen($end);
if($include_start_end)
return substr($string, $pos1, max(0, $apos2-$pos1));
function l($s) {
$fp = fopen(dirname(__FILE__)."/request.log", "a+");
fputs($fp, print_r($s, true));
fputs($fp, "\r\n\r\n");
fclose($fp);
}
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
//
@GodSaveEarth
GodSaveEarth / poem.txt
Created May 30, 2019 20:43
Inspiring Poetry
If I had the time, I'd make a rhyme
@GodSaveEarth
GodSaveEarth / bookmarklet.js
Created May 30, 2019 20:48
Inspiring Poetry
lalala
@GodSaveEarth
GodSaveEarth / bookmarklet.js
Created May 30, 2019 20:48
Inspiring Poetry
// Demo code (the actual new parser character stream implementation)
function StringStream(string) {
this.pos = 0;
this.string = string;
}
StringStream.prototype = {
done: function() {return this.pos >= this.string.length;},
peek: function() {return this.string.charAt(this.pos);},
@GodSaveEarth
GodSaveEarth / bookmarklet.js
Last active May 31, 2019 20:09
Inspiring Poetry
sample
asd
asd
asd
as
das
d
as
da
sd
@GodSaveEarth
GodSaveEarth / bookmarklet.js
Created May 31, 2019 20:40
Inspiring Poetry
// write your bookmarklet here gdfgdfg
@GodSaveEarth
GodSaveEarth / bookmarklet.js
Created May 31, 2019 20:40
Inspiring Poetry
// write your bookmarklet here gdfgdfg fghfghfg fghfghfgh