Skip to content

Instantly share code, notes, and snippets.

View dmoneyballer's full-sized avatar
💭
making cool stuff

Drew Gillies dmoneyballer

💭
making cool stuff
View GitHub Profile
@dmoneyballer
dmoneyballer / manifest.json
Created December 10, 2018 15:11
manifsest for edge extension
{
"manifest_version": 2,
"name": "Template Browser Extension",
"author": "RyanWhoCodes",
"description": "Template Browser Extension",
"homepage_url": "https://github.com/ryanwhocodes/template-browser-extension",
"version": "0.0.1",
"browser_action": {
"default_popup": "popup.html",
"default_title": "Template Browser Extension"
@dmoneyballer
dmoneyballer / popup.js
Created December 10, 2018 15:21
modded for Edge browser.
// Link Formatter js
// hide the alert that will be triggered if there is a failure to copy text
$('#alert').hide()
// to close the alert
$("#alert").click(() => {
$('#alert').hide()
});
// Copy button events, obtains the input id from amending the button id
$("button").click((event) => {
let inputId = "#" + event.target.id.replace("CopyButton", "Input")
<head>
<title>Doggos for you today!</title>
<meta name="description" content="random, ratable doggos">
<html lang="en">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<link rel="stylesheet" href="style.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
</head>
<div class="container">
<head>
<title>Doggos for you today!</title>
<meta name="description" content="random, ratable doggos">
<html lang="en">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<link rel="stylesheet" href="style.css">
<script src="https://code.jquery.com/jquery-3.4.0.js" integrity="sha256-DYZMCC8HTC+QDr5QNaIcfR7VSPtcISykd+6eSmBW5qo=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
</head>
# Put your code here
rfile = input("enter the file to read from")
wfile = input("enter the file to write to")
reading = open(rfile, 'r')
writing = open(wfile, 'w')
count = 1
for line in reading:
writing.write(f' {count}> {line}')
count += 1
f = input('What\'s the file you want to read from?')
with open(f, 'r') as fr:
print('Name \t Hours \t Total Pay')
for line in fr:
print(f"{line.split()[0]} \t {line.split()[1]} \t {line.split()[2]}")
f = input('what file would you like to read?')
text = set()
with open(f, 'r') as fr:
for line in fr:
vals = line.split()
for val in vals:
text.add(val)
text = sorted(text)
for val in text:
print(val)
# Put your code here
from collections import OrderedDict
with open('test.txt', 'w') as e:
e.write("""I DO NOT LIKE THEM IN A HOUSE
I DO NOT LIKE THEM WITH A MOUSE
I DO NOT LIKE THEM HERE OR THERE
I DO NOT LIKE THEM ANYWHERE
I DO NOT LIKE GREEN EGGS AND HAM
I DO NOT LIKE THEM SAM I AM """)
start = input('Enter the input file name:')
When I look at you my heart thumps
Baby Baby Baby oh
My Achey Breaky Heart
In Your Eyes
The First Time I Saw Your Eyes
I Will Always Love You
When a Man Loves a Woman
Your Song
My Love
You're Still the One
I've been thinking a lot about you lately and I'm liking what I'm thinking.
Just wanted to take a minute to say I love you.
I really like you still after all we've been through.
You make me very happy.
I'm glad I know you.
You're my #1!!!
You make the best dinners.
I think your hair is pretty.
I think your teeth are pretty.
I like to see you smile.