Skip to content

Instantly share code, notes, and snippets.

View GleasonK's full-sized avatar

Kevin Gleason GleasonK

View GitHub Profile
@GleasonK
GleasonK / AtomicNameCSS.html
Created April 18, 2014 17:15
A simple way to use CSS to create an animated atomic orbital logo
<html lang="en-US">
<head>
<!-- <link href="CSSGist.css" rel="stylesheet" type="text/css"> -->
<style>
#orbit-case{
width: 500px;
height:500px;
@GleasonK
GleasonK / 01.html
Last active August 29, 2015 14:21
[Blog] Turn Your Smartphone into an Elegant Gamepad with PubNub and Polymer
<!-- First Import: -->
<link rel="import" href="paper-fab.html">
...
<!-- Then use: -->
<paper-fab icon="send"></paper-fab>
@GleasonK
GleasonK / detector.py
Created June 12, 2015 22:07
OpenCV Detector
import cv2
class Detector():
def __init__(self, image_name):
self.image_name = image_name # The image file name
self.image = [] # OpenCV image array
self.drawn = 0 # Count of how many detector-boxes have been drawn
self.drawColors = [(255,0,0),(0,255,0),(0,0,255),(255,255,0),(255,0,255),(0,255,255)] #RGB Values
self.path = "xml/" # The path to the haarcascades data xml files
self.rects = [] # Discovered rectangles from Image Analysis
@GleasonK
GleasonK / 01.html
Last active August 29, 2015 14:23
Polymer 1.0 To-Do App
<link rel="import" href="paper-fab">
...
<paper-fab icon="send"></paper-fab>
@GleasonK
GleasonK / AndroidManifest.xml
Last active August 29, 2015 14:26
Code for the PnWebRTC Tutorial
<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" />
<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
@GleasonK
GleasonK / 01.html
Last active February 4, 2016 04:40
WebRTC-TicTacToe code snippets
<div id="tic-tac-box" style="float: left; width: 47%;"></div>
<div style="float: left; width: 50%;">
<div id="video-chat" hidden="true">
<div id="vid-box"></div>
<button onclick="end()">End Call</button>
</div>
<form name="loginForm" id="login" action="#" onsubmit="return login(this);">
<input type="text" name="username" id="username" placeholder="Enter A Username"/>
<input type="submit" name="login_submit" value="Log In">
</form>
@GleasonK
GleasonK / 01.html
Last active May 7, 2016 10:03
WebRTC-YouTubeTogether snippets
<div id="player"></div>
<div style="float: left; width: 50%;">
<div id="video-chat" hidden="true" style="margin-bottom: 10px;">
<div id="vid-box"></div>
<button onclick="end()">End Call</button>
</div>
<form name="loginForm" id="login" action="#" onsubmit="return login(this);">
<input type="text" name="username" id="username" placeholder="Enter A Username"/>
<input type="submit" name="login_submit" value="Log In">
@GleasonK
GleasonK / 01.html
Last active May 7, 2016 10:03
BasicRTC WebRTC Video Chat and Groups
<div id="vid-box"></div>
<div id="vid-thumb"></div>
<form name="loginForm" id="login" action="#" onsubmit="return login(this);">
<input type="text" name="username" id="username" placeholder="Pick a username!" />
<input type="submit" name="login_submit" value="Log In">
</form>
<form name="callForm" id="call" action="#" onsubmit="return makeCall(this);">
@GleasonK
GleasonK / 01.py
Last active October 18, 2017 23:06
[Blog] DIY Hue Lightbulb with Android Control
#!/usr/bin/python
import time
import RPi.GPIO as GPIO
from pubnub import Pubnub
@GleasonK
GleasonK / 02.html
Created December 6, 2015 22:55 — forked from ToeJamson/02.html
WebRTC Parts 1-3 Edits
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="https://cdn.pubnub.com/pubnub-3.7.14.min.js"></script>
<script src="https://cdn.pubnub.com/webrtc/webrtc.js"></script>