Skip to content

Instantly share code, notes, and snippets.

@promediacorp
promediacorp / index.html
Created November 5, 2014 18:10
HTML file for Googlebot Demo
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Test Page</title>
<style>
body {
margin: 40px;
font-size: 16px;
font-family: "Helvetica Neue", sans-serif;
@promediacorp
promediacorp / server.py
Created November 5, 2014 18:09
Flask server for Googlebot Demo
# -*- coding: utf-8 -*-
from flask import Flask, render_template, request
app = Flask(__name__)
@app.route("/")
def start():
return render_template("index.html")
@app.route("/moby")
@promediacorp
promediacorp / selenium.py
Created November 5, 2014 18:06
selenium example
from selenium import webdriver
driver = webdriver.Firefox()
driver.get("http://lyft.com/cities")
links = driver.find_elements_by_xpath("//*[@href]")
for i in links:
print i.text
@promediacorp
promediacorp / gist:f69055f38a57e239d764
Created July 22, 2014 22:55
Feld GTM all sites container
<!-- Google Tag Manager -->
<noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-W3TRKK"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-W3TRKK');</script>
<!-- End Google Tag Manager -->
@promediacorp
promediacorp / combinewords.py
Created March 15, 2014 16:30
Takes a list of prefixes and suffixes to generate word combinations.
#combines words together
import itertools
list_combined_words = []
fh_pre = open("foods.txt", "r")
fh_suf = open("shopping.txt", "r")
list_pre = [line.strip() for line in fh_pre.readlines()]
list_suf = [line.strip() for line in fh_suf.readlines()]
@promediacorp
promediacorp / domainfinder.py
Created March 15, 2014 16:26
Uses a combined words list to find available domain names.
#bulk domain name checker by available domain naimes
import whois
import os, sys
#from makewords import list_generated_words, MakeWords
from combinewords import list_combined_words
int_num_letters = int(sys.argv[1])
num_words = int(sys.argv[2])