Skip to content

Instantly share code, notes, and snippets.

View bologer's full-sized avatar
🎯
Focusing

Alexander Teshabaev bologer

🎯
Focusing
View GitHub Profile
@bologer
bologer / gist:70e5513f35c9020a9961a768c1c56c14
Created January 7, 2019 09:16 — forked from saippuakauppias/gist:4714695
javascript vkontakte api wall post: постинг на стену к текущему пользователю на JS vk API. С помощью этого кода так же можно отправлять записи на стены групп, пользователей и публичных страниц (пабликов). Используется в iframe приложениях вконтакте.
/*
* message - сообщение, которое будет опубликовано
* image - картинка для постинга
* user_id - id текущего пользователя (к нему будет осуществлён постинг)
*/
function wallPost(message, image, user_id) {
VK.api('photos.getWallUploadServer', {
uid: user_id
}, function (data) {
if (data.response) {
@bologer
bologer / cloudflare-challenge.js
Created February 27, 2017 17:46 — forked from alexwilson/cloudflare-challenge.js
This is a project designed to get around sites using Cloudflare's "I'm under attack" mode. Using the PhantomJS headless browser, it queries a site given to it as the second parameter, waits six seconds and returns the cookies required to continue using this site. With this, it is possible to automate scrapers or spiders that would otherwise be t…
/**
* This is a project designed to get around sites using Cloudflare's "I'm under attack" mode.
* Using the PhantomJS headless browser, it queries a site given to it as the second parameter,
* waits six seconds and returns the cookies required to continue using this site. With this,
* it is possible to automate scrapers or spiders that would otherwise be thwarted by Cloudflare's
* anti-bot protection.
*
* To run this: phantomjs cloudflare-challenge.js http://www.example.org/
*
* Copyright © 2015 by Alex Wilson <antoligy@antoligy.com>