Skip to content

Instantly share code, notes, and snippets.

❄️
winter in russian midland is longer than 1/2 of year

Serg 1d10t

❄️
winter in russian midland is longer than 1/2 of year
Block or report user

Report or block 1d10t

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View vk-fullhd-cache-list.js
String.prototype.htmldecode = function(){
if(!window.htmldecode_textarea) window.htmldecode_textarea = document.createElement('textarea');
window.htmldecode_textarea.innerHTML = this;
return window.htmldecode_textarea.value;
}
function ubtoa(str){
return window.btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, function(match, p1) {
View linkedin-search-content-generate-emails.js
// Every monday
// https://www.linkedin.com/search/results/content/?authorIndustry=%5B%22104%22%2C%22137%22%5D&facetSortBy=date_posted&keywords=php%20remote&origin=SORT_RESULTS&recency=past-week
[].map.call(document.querySelectorAll('button[data-control-name="commentary_expand"]'), e => e.click())
var textNode, textNodes = document.evaluate( '//div[contains(@class,"feed-shared-text-view")]', document, null, XPathResult.ANY_TYPE, null );
while (textNode = textNodes.iterateNext()) {
let text = textNode.textContent, m = text.match(/\b[a-z\d][a-z\d._-]*@[a-z\d._-]+[a-z\d]\b/i);
if(!m) continue;
var
View google-contacts-compact-view-select-without-pthone-email.js
(_ => {
const scrollable = document.querySelector('c-wiz[data-ogpc]');
setInterval(_ => {
let scrollby = 0;
[].map.call(document.querySelectorAll('div[role="presentation"]'), e => {
scrollby += e.offsetHeight;
const dd = {};
@1d10t
1d10t / insta-follow.js
Last active Aug 22, 2019
follow instagam list
View insta-follow.js
const tout = 10*1000;
let skip = 0, lbsc = 0;
setInterval(_ => {
if(skip){ skip--; lbsc = 0; return; }
const bs = [].filter.call(document.querySelectorAll('div[role="dialog"] button'), e => e.innerText=='Follow'), bsc = bs.length;
if(bsc){
if(bsc == lbsc){ skip = Math.round(5*60*1000/tout); return; }
bs[Math.floor(bsc*Math.random())].click();
lbsc = bsc;
}
@1d10t
1d10t / linkedin-mass-contact.js
Last active Mar 6, 2019
linkedin-mass-contact.js
View linkedin-mass-contact.js
// ==UserScript==
// @name установить контакт со всеми
// @namespace http://tampermonkey.net/
// @version 0.1
// @author Sergey S Yaglov
// @match https://www.linkedin.com/search/results/people/*
// @include https://www.linkedin.com/search/results/people/*
// @grant https
// @run-at context-menu
// ==/UserScript==
@1d10t
1d10t / packff.bat
Created Nov 23, 2018
pack directory-separated arrays of mp3 pieces to a big mp3s
View packff.bat
php -r "foreach(glob('./*/') as $d){ $dn=basename($d); $a=glob($d.'*.mp3'); natsort($a); var_dump($dn, $a); $asize=array_sum(array_map('filesize',$a)); $rf=$dn.'-ffccat.mp3'; $lf=$dn.'.txt'; if(file_exists($rf)&&filesize($rf)>=$asize) continue; foreach($a as $i => $f) file_put_contents($lf, \"file '$f'\n\", $i ? FILE_APPEND : null); passthru('c:/ffmpeg/ffmpeg-20181015-c27c7b4-win64-static/bin/ffmpeg -f concat -safe 0 -i '.escapeshellarg($lf).' -c copy '.escapeshellarg($rf)); }"
@1d10t
1d10t / up_vpn.sh
Last active Aug 26, 2018
openwrt vpn up cron script
View up_vpn.sh
#!/bin/sh
. /usr/share/libubox/jshn.sh
O=$(ubus -S call network.interface status "{ \"interface\" : \"vpn0\" }")
json_load "$O"
json_get_var up up
if [ "$up" == "0" ]; then
@1d10t
1d10t / shmop-array.php
Created Mar 15, 2018
shared memory array
View shmop-array.php
<?php
/*
$port = 9050;
$proxy_score = new shmop_arr('x', 4*1024);
$proxy_score[$port] = isset($proxy_score[$port]) ? $proxy_score[$port]+1 : 1;
View letsencrypt certbot custom assistant autorenew expect script
#!/usr/bin/expect -f
set domain [lindex $argv 0]
set www_root [lindex $argv 1]
spawn /root/certbot/letsencrypt-auto certonly --manual -d $domain
View saveImageToYandexDisk.php
<?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;
You can’t perform that action at this time.