Skip to content

Instantly share code, notes, and snippets.

💭
Driving my clown car looking for gold mines.

Christopher Pedersen topherPedersen

💭
Driving my clown car looking for gold mines.
Block or report user

Report or block topherPedersen

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@topherPedersen
topherPedersen / jerry_jonze_landing_page.html
Created Aug 15, 2019
Mobile Friendly Landing Page for Jerry Jonze Pro Football Embed
View jerry_jonze_landing_page.html
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1 user-scalable=no">
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-50583537-2"></script>
<script>
window.dataLayer = window.dataLayer || [];
@topherPedersen
topherPedersen / jerry_jonze_mobile.py
Created Aug 15, 2019
Jerry Jonze Pro Football (Mobile Friendly REPL Embed Demo)
View jerry_jonze_mobile.py
import random
import time
length_of_pause = 2
##################################
print("")
print("Jerry Jonze Pro Football")
print("by Topher Pedersen")
print("")
@topherPedersen
topherPedersen / share_repl.html
Created Aug 15, 2019
Shareable Command Line REPL Template 1
View share_repl.html
<!DOCTYPE html>
<html>
<head>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-50583537-2"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
@topherPedersen
topherPedersen / no-flash-on-button-click.html
Last active Aug 12, 2019
How to Prevent a Button from Changing its Border and Background Color in CSS When Clicked
View no-flash-on-button-click.html
<!DOCTYPE html>
<html>
<head>
<style>
.noFlash {
/* Remove onclick Background Color Change */
/* REFERENCE: https://bit.ly/2Yc95wR */
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
View tic_tac_toe_starter_template.py
print("Welcome to Noel's Ultimate Tic Tac Toe Experience")
spot1 = "1"
spot2 = "2"
spot3 = "3"
spot4 = "4"
spot5 = "5"
spot6 = "6"
spot7 = "7"
spot8 = "8"
@topherPedersen
topherPedersen / simple_api_example.py
Created Aug 7, 2019
RESTful Python API in 50 Lines or Less (Listens for HTTP Requests and Spits out JSON)
View simple_api_example.py
# Import Flask
from flask import Flask, render_template, request, jsonify, session, redirect, url_for, Response
app = Flask(__name__)
# REFERENCE: http://blog.luisrei.com/articles/flaskrest.html
@app.route('/dictionary-to-json-test', methods=['GET', 'POST'])
def dictionary_to_json_test():
list_of_categories = []
@topherPedersen
topherPedersen / complicated_dictionary.py
Created Aug 7, 2019
Sort of Complicated Python Dictionaries
View complicated_dictionary.py
# Playing around with Python Dictionaries
# (planning on using something like this to spit out JSON with Flask)
my_dictionary = {
"foo": 13,
"bar": 18.7,
"baz": "yeet"
}
print(my_dictionary["foo"])
@topherPedersen
topherPedersen / iso8601_date_string_to_integer.py
Created Aug 4, 2019
Get Year Month & Day as Integers from an ISO 8601 Date String
View iso8601_date_string_to_integer.py
date_str = "2017-01-29"
year_str = date_str[0] + date_str[1] + date_str[2] + date_str[3]
month_str = date_str[5] + date_str[6]
day_str = date_str[8] + date_str[9]
year_int = int(year_str)
month_int = int(month_str)
@topherPedersen
topherPedersen / spacewalk.html
Created Jul 31, 2019
SpaceWalk PhaserJS Tutorial
View spacewalk.html
<!DOCTYPE html>
<html>
<head>
<script src="//cdn.jsdelivr.net/npm/phaser@3.18.0/dist/phaser.js"></script>
<!-- import phaser (phaser.js) -->
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/phaser-ce/2.13.2/phaser.min.js"></script> -->
<style>
body {
margin: 0;
overflow: hidden;
@topherPedersen
topherPedersen / flappybird.html
Last active Jul 27, 2019
FlappyBirdJS Tutorial by Topher & Sanay
View flappybird.html
<!doctype html>
<!-- FlappyBirdJS by Sanay N. & Topher P.-->
<!-- https://github.com/topherPedersen/FlappyBirdJS -->
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Making your first Phaser 3 Game - Part 2</title>
<script src="//cdn.jsdelivr.net/npm/phaser@3.11.0/dist/phaser.js"></script>
<style type="text/css">
body {
You can’t perform that action at this time.