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 / devunajoyo.py
Created March 17, 2016 23:51
End Launches
#!/usr/bin/env python
#Hmmm... http://www.endclothing.com/media/us_sitemap.xml
import urllib2, zlib, json
url='https://launches.endclothing.com/api/products'
req = urllib2.Request(url)
req.add_header(':host','launches.endclothing.com');req.add_header(':method','GET');req.add_header(':path','/api/products');req.add_header(':scheme','https');req.add_header(':version','HTTP/1.1');req.add_header('accept','application/json, text/plain, */*');req.add_header('accept-encoding','gzip,deflate');req.add_header('accept-language','en-US,en;q=0.8');req.add_header('cache-control','max-age=0');req.add_header('cookie','__/');req.add_header('user-agent','Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/37.0.2062.120 Chrome/37.0.2062.120 Safari/537.36');
@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:*'",