Skip to content

Instantly share code, notes, and snippets.

Avatar

Andreas Asprou andreasasprou

View GitHub Profile
View codeshareIsDead.js
_getData = () => {
// Lets first set loading and disabled to be true
this.setState({ loading: true, disabled: true });
fetch('http://192.168.0.39/UserInfo/get_power_level.php')
//convert response to JSON format
.then((response) => response.json())
.then((responseJson) => {
// responseJson should be an object with a key "id", so we can access "id" by writing responseJson.id
View bet365.js
require('chromedriver');
const webdriver = require('selenium-webdriver');
const cheerio = require('cheerio');
const Builder = webdriver.Builder
const By = webdriver.By
const until = webdriver.until
const driver = new Builder()
.setAlertBehavior('ignore')
View messengerSketch.js
/* Connecting to a channel */
export function connectToChannelListener() {
takeLatest(OPEN_CHANNEL, connectToChannelHandler);
}
export function* connectToChannelHandler({ uuid }) {
try {
const socket = yield call(connect, uuid);
@andreasasprou
andreasasprou / facebookProfile.js
Created Mar 19, 2017
Minimal Facebook profile scraper
View facebookProfile.js
var fs = require('fs');
var casper = require('casper').create({
verbose: true,
userAgent: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.98 Safari/537.36",
pageSettings: {
loadImages: false,
loadPlugins: false
}
});
You can’t perform that action at this time.