Skip to content

Instantly share code, notes, and snippets.

@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])
@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 / 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 / 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 / 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 / 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 / Forever 21 Href Lang Tags
Last active August 29, 2015 14:11
Forever 21 Href Lang Tags
<!-- Instructions for Setting hreflang tags. See https://support.google.com/webmasters/answer/189077?hl=en for more info. The language is in ISO 639-1 format, and the country is ISO 3166-1 Alpha 2 ! -->
<!-- Header of US Homepage-->
<head>
<title>Forever 21 US</title>
<!-- This is the master, official homepage URL for US -->
<link rel="canonical" href="http://www.forever21.com/" />
@promediacorp
promediacorp / debug.py
Last active August 29, 2015 14:20
flask app debug
import logging
from flask import Flask, render_template
import smtplib
app = Flask(__name__)
ADMINS = ['wilensky@gmail.com']
app.config['LOG_FILE'] = 'application.log'
if not app.debug:
@promediacorp
promediacorp / uphail_v3_country_schema.json
Last active November 4, 2015 16:37
uphail_v3 countries schema
{
"_id":"eng",
"country_name_eng":"England",
"country_name_native":"England",
"country_name_synonyms":[
"United Kingdom",
"Great Britain"
],
"capital":"London",
"continent":"Europe",
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- v3_leaderboard_first -->
<ins class="adsbygoogle"
style="display:inline-block;width:728px;height:90px"
data-ad-client="ca-pub-2045228090082912"
data-ad-slot="5547733290"
data-max-num-ads="1"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>