Skip to content

Instantly share code, notes, and snippets.

View StickmanNinja's full-sized avatar
🌴
On vacation

STICKMAN NINJA StickmanNinja

🌴
On vacation
  • Little Rock, Arkansas
View GitHub Profile
@StickmanNinja
StickmanNinja / Search Theme.html
Last active October 14, 2018 04:08
Search Theme
<!DOCTYPE html>
<html>
<head>
<title>Modern Search Engine</title>
<style>
body, html {width: 100%; height: 100%; margin: 0px; background-color: #ffffff;}
.bar1, .bar2, .bar3, .bar4, .bar5, .bar6, .bar7, .bar8, .bar9 {
margin-left: -30px;
}
@StickmanNinja
StickmanNinja / pyramid.html
Last active September 12, 2018 22:03
A circular image portfolio page built using Bootstrap framework.
<!DOCTYPE html>
<html>
<head>
<title>Title of the document</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<!-- jQuery library -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<!-- Latest compiled JavaScript -->
@StickmanNinja
StickmanNinja / FindTedCruzPoll.py
Created September 6, 2018 21:23
A simple little Python notification system that looks for Ted Cruz polling data on Google. If the data exists, then the script notifies me via text message
from bs4 import BeautifulSoup
from six.moves import urllib
from selenium import webdriver
from selenium.webdriver.firefox.options import Options
import requests
from selenium import webdriver
from selenium.common.exceptions import NoSuchElementException
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import Select
@StickmanNinja
StickmanNinja / timezones.html
Created September 2, 2018 23:44
A list of 592 timezone options for a custom dropdown menu in html.
<option value='Africa/Abidjan'>Africa/Abidjan</option>
<option value='Africa/Accra'>Africa/Accra</option>
<option value='Africa/Addis_Ababa'>Africa/Addis_Ababa</option>
<option value='Africa/Algiers'>Africa/Algiers</option>
<option value='Africa/Asmara'>Africa/Asmara</option>
<option value='Africa/Asmera'>Africa/Asmera</option>
<option value='Africa/Bamako'>Africa/Bamako</option>
<option value='Africa/Bangui'>Africa/Bangui</option>
<option value='Africa/Banjul'>Africa/Banjul</option>
<option value='Africa/Bissau'>Africa/Bissau</option>
@StickmanNinja
StickmanNinja / Dropdown.py
Last active September 2, 2018 23:37
Generate HTML Dropdown Select List of All Timezones with Python 2.7
import pytz
print "<select name='timezone'>"
for i in pytz.all_timezones:
print "<option value='" + str(i) + "'>" + str(i) + "</option>"
print "</select>"
@StickmanNinja
StickmanNinja / WeatherTool.py
Created September 2, 2018 06:34
Gets weather forecast from national weather service.
import urllib2
import urllib
from bs4 import BeautifulSoup
def currentWeather(zipcode):
url = 'https://forecast.weather.gov/zipcity.php'
data = urllib.urlencode({'inputstring': str(zipcode)})
req = urllib2.Request(url=url, data=data)
resp = urllib2.urlopen(req)
@StickmanNinja
StickmanNinja / Example.py
Created August 30, 2018 02:50
Selenium Python App On Linux
# Run these commands on your linux computer.
#apt-get update
#apt-get install firefox
#pip3 install selenium==3.0.2
#wget https://github.com/mozilla/geckodriver/releases/download/v0.14.0/geckodriver-v0.14.0-linux64.tar.gz -O /tmp/geckodriver.tar.gz && tar -C /opt -xzf /tmp/geckodriver.tar.gz && chmod 755 /opt/geckodriver && ln -fs /opt/geckodriver /usr/bin/geckodriver && ln -fs /opt/geckodriver /usr/local/bin/geckodriver
from selenium import webdriver
driver = webdriver.Firefox()
driver.get('http://google.com')
print driver.title
@StickmanNinja
StickmanNinja / alarmclock.py
Created August 28, 2018 07:41
A basic Python 2.7 alarm clock that automatically prints "yay!" for every time of the day included in the timelist.
import datetime
import time
timelist = ["0800", "1700", "2400", "0233"]
def checkTime():
global timelist
date = datetime.datetime.now()
date = str(date)
date = date.split(" ")