Skip to content

Instantly share code, notes, and snippets.

View IAlwaysBeCoding's full-sized avatar

IAlwaysBeCoding IAlwaysBeCoding

View GitHub Profile
@IAlwaysBeCoding
IAlwaysBeCoding / puppeteer-bot.js
Created May 5, 2019 23:46 — forked from nicoandmee/puppeteer-bot.js
disguisePage - undetectable puppeteer
const WEBGL_RENDERERS = ['ANGLE (NVIDIA Quadro 2000M Direct3D11 vs_5_0 ps_5_0)', 'ANGLE (NVIDIA Quadro K420 Direct3D9Ex vs_3_0 ps_3_0)', 'ANGLE (NVIDIA Quadro 2000M Direct3D9Ex vs_3_0 ps_3_0)', 'ANGLE (NVIDIA Quadro K2000M Direct3D11 vs_5_0 ps_5_0)', 'ANGLE (Intel(R) HD Graphics Direct3D9Ex vs_3_0 ps_3_0)', 'ANGLE (Intel(R) HD Graphics Family Direct3D9Ex vs_3_0 ps_3_0)', 'ANGLE (ATI Radeon HD 3800 Series Direct3D9Ex vs_3_0 ps_3_0)', 'ANGLE (Intel(R) HD Graphics 4000 Direct3D11 vs_5_0 ps_5_0)', 'ANGLE (Intel(R) HD Graphics 4000 Direct3D11 vs_5_0 ps_5_0)', 'ANGLE (AMD Radeon R9 200 Series Direct3D11 vs_5_0 ps_5_0)', 'ANGLE (Intel(R) HD Graphics Direct3D9Ex vs_3_0 ps_3_0)', 'ANGLE (Intel(R) HD Graphics Family Direct3D9Ex vs_3_0 ps_3_0)', 'ANGLE (Intel(R) HD Graphics Direct3D9Ex vs_3_0 ps_3_0)', 'ANGLE (Intel(R) HD Graphics Family Direct3D9Ex vs_3_0 ps_3_0)', 'ANGLE (Intel(R) HD Graphics 4000 Direct3D9Ex vs_3_0 ps_3_0)', 'ANGLE (Intel(R) HD Graphics 3000 Direct3D9Ex vs_3_0 ps_3_0)', 'ANGLE (Mobile Intel(R) 4 Seri
@IAlwaysBeCoding
IAlwaysBeCoding / XPath Cheat Sheet
Created December 13, 2018 19:14 — forked from jmaccabee/XPath Cheat Sheet
Common XPath tips and tricks
// XPath CheatSheet
// To test XPath in your Chrome Debugger: $x('/html/body')
// http://www.jittuu.com/2012/2/14/Testing-XPath-In-Chrome/
// Credit to the original author: https://gist.github.com/LeCoupa/8c305ec8c713aad07b14
// 0. XPath Examples.
// More: http://xpath.alephzarro.com/content/cheatsheet.html
@IAlwaysBeCoding
IAlwaysBeCoding / synchronous.py
Last active September 21, 2018 04:52
Scrapy Spider Middleware
from scrapy import Request
class SynchronousSpiderMiddleware(object):
def process_spider_output(self, response, result, spider):
listing_request = None
for request in result:

Live Coding a KSQL Application

Introduction

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
@IAlwaysBeCoding
IAlwaysBeCoding / dns_resolver_middleware.py
Created June 21, 2017 00:19 — forked from w495/dns_resolver_middleware.py
Scrapy downloader middleware class for handling IPv6-only hosts.
# -*- coding: utf8 -*-
from __future__ import absolute_import, division, print_function
import socket
from urlparse import urlparse
class DnsResolverMiddleware(object):
"""
<!doctype html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
<title>pdoc_bug API documentation</title>
<meta name="description" content="" />
<link href='http://fonts.googleapis.com/css?family=Source+Sans+Pro:400,300' rel='stylesheet' type='text/css'>
@IAlwaysBeCoding
IAlwaysBeCoding / Puzzle using comprehension
Last active September 14, 2015 04:58
python puzzle
S = 'coffee Tea Lemonade'
print [sum(1 for l in word if l in ('a','e','i','o','u','A','E','I','O','U')) for word in S.split(' ')]