Skip to content

Instantly share code, notes, and snippets.

View dobrienSTJ's full-sized avatar

Daniel O'Brien dobrienSTJ

View GitHub Profile
@dobrienSTJ
dobrienSTJ / FakeNews.py
Created May 30, 2018 09:08 — forked from MrDMurray/FakeNews.py
FakeNews.py
from urllib.request import urlopen
from xml.dom import minidom
import collections
# extract the headlines from the feed
def extractString(doc):
str = ""
for node in doc.getElementsByTagName('channel'):
for title in node.getElementsByTagName('title'):
str = str + title.firstChild.data + "\n"
@dobrienSTJ
dobrienSTJ / Hello_Python.py
Last active January 17, 2018 11:11
Python
from time import sleep #time for our program
import webbrowser #web design
import math #maths functions
import string
import random
import time
def square(x,y): #functions for a square
return x*y
<html>
<body>
<span id="div1" style="color:black;" onmouseover="stext()" onmouseout="htext()">TEXT1</span><p />
<hr color="black" />
<span id="div2" style="color:red;" onmouseover="htext()" onmouseout="stext()">Text2</span>
function stext() {
var x = document.getElementById("div1");
var y = document.getElementById("div2");
x.style.color = 'red';
@dobrienSTJ
dobrienSTJ / Hover.html
Last active November 10, 2017 12:44
Hovering
onmouseover = "this.style.color='white';" onmouseout="this.style.color='blacḱ';"
@dobrienSTJ
dobrienSTJ / icon.html
Created November 9, 2017 10:20
Taskbar Icon
<link rel="icon" href="https://cdn4.iconfinder.com/data/icons/32x32-free-design-icons/32/Microsoft_flag.png">
.header{width:100%;
position:fixed;
top:0px;
background: #00FFFF;
font-size: 30px;
text-align: center;}
<div class="header">
//Add Menu Here
</div>
<div id="nav">
<ul>
<li>
<a href="#">Home</a>
</li>
<li><a href="Opaque.html">Images</a>
</li>
<li><a href="Slideshow.html">Gallery</a>
</li>
<li><a href="#">More Info</a>
@dobrienSTJ
dobrienSTJ / Blink.html
Created October 11, 2017 09:51
Blinking!
https://stackoverflow.com/questions/643879/css-to-make-html-page-footer-stay-at-bottom-of-the-page-with-a-minimum-height
https://www.w3schools.com/bootstrap/bootstrap_navbar.asp
@dobrienSTJ
dobrienSTJ / Video.html
Created October 6, 2017 11:49
Video HTML
video#vid {
position: fixed; right: 0; bottom: 0;
min-width: 100%; min-height: 100%;
width: auto; height: auto; z-index: -100;
background-size: cover;
margin: 0 auto;
}
<video autoplay loop id="vid">
<source src="https://www.tesla.com/ns_videos/Model3_WebsiteHero_Master_D.mp4?20170801" type="video/mp4">