Skip to content

Instantly share code, notes, and snippets.

View thadclay's full-sized avatar

thadclay thadclay

View GitHub Profile
@thadclay
thadclay / 2cap.js
Created November 21, 2017 18:08 — forked from dzt/2cap.js
undefeated raffle script (use node undefeated.js to run it)
var request = require('request');
var getToken = function(sitekey, key, callback) {
var twoCapID;
var checkCaptcha = function() {
request({
url: 'http://2captcha.com/res.php',
method: 'get',
qs: {
key: key,
@thadclay
thadclay / test-chromedriver.py
Created November 23, 2016 02:53
Test if chromedriver works
import time
from selenium import webdriver
driver = webdriver.Chrome('./chromedriver') # Optional argument, if not specified will search path.
driver.get('http://www.google.com/xhtml');
time.sleep(5) # Let the user actually see something!
search_box = driver.find_element_by_name('q')
search_box.send_keys('ChromeDriver')
search_box.submit()
time.sleep(5) # Let the user actually see something!
@thadclay
thadclay / proxy-ubuntu-linux.sh
Created October 29, 2016 02:39
Script to setup squid3 with no authentication accepting all traffic (run as sudo)
#!/bin/bash
#
# Ubuntu
#
set -v
apt-get -y update
apt-get install -y ntpdate
@thadclay
thadclay / proxy-debian-linux.sh
Created October 29, 2016 02:39
Script to setup squid3 with no authentication accepting all traffic (run as sudo)
#!/bin/bash
#
# Debian
#
set -v
apt-get -y update
apt-get install -y ntpdate
<html>
<head>
<meta charset="UTF-8">
<?php
$debug=False;
set_time_limit(0);
$actionURL="/d3stryr-3stripes-dev.php";
?>
<title>d3stryr 3stripes</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
@thadclay
thadclay / d3stryr-3stripes-atc-cs.php
Created October 14, 2016 18:49
Helper script for d3stryr-3stripes.php
<?php
set_time_limit(0);
$marketsList=[];
$marketsList['AT']='de_AT';
$marketsList['AU']='en_AU';
$marketsList['BE']='fr_BE';
$marketsList['BR']='pt_BR';
$marketsList['CA']='en_CA';
$marketsList['CL']='es_CL';
@thadclay
thadclay / d3stryr-3stripes.php
Created October 14, 2016 18:48
All Day I Dream About Sleeping
<html>
<head>
<meta charset="UTF-8">
<?php $debug=False; set_time_limit(0); ?>
<title>d3stryr 3stripes</title>
<script>
function setCookie(cname, cvalue, exdays) {
var d = new Date();
d.setTime(d.getTime() + (exdays*24*60*60*1000));
var expires = "expires="+d.toUTCString();
#!/usr/bin/env python
import datetime
import inspect
import json
import lxml.html
from lxml.cssselect import CSSSelector
import re
import requests
import os
@thadclay
thadclay / package.json
Created November 28, 2015 14:06 — forked from anonymous/package.json
browserify+stylus+babel+hotreload
{
"scripts": {
"test": "mocha -g",
"start": "babel-node server.js",
"prestart": "npm run build",
"build": "npm-run-all 'build:*'",
"build:js": "cross-env NODE_ENV=production browserify -t babelify -t envify src/app.js > static/build.js",
"postbuild:js": "uglifyjs static/build.js -o static/build.js",
"build:css": "cross-env NODE_ENV=production stylus css/main.styl -o static",
"watch": "npm-run-all --parallel 'watch:*'",
var socketIO = require('socket.io'),
io;
// hapi plugin registration
exports.register = function(plugin, options, next) {
// this is the hapi specific binding
io = socketIO.listen(plugin.servers[0].listener);
io.sockets.on('connection', function(socket) {
socket.emit({msg: 'welcome'});