Skip to content

Instantly share code, notes, and snippets.

@byee01
byee01 / dabblet.html
Created October 23, 2012 23:52
Untitled
<svg class="annotation-close-button" width="100%" height="100%" viewBox="0 0 21 21">
<circle cx="10" cy="10" r="8"/>
<path d="M 7,7 L 13,13"/>
<path d="M 7,13 L 13,7"/>
</svg>
@byee01
byee01 / dabblet.css
Created June 7, 2012 17:39
Brian's Test Typography
/**
* Brian's Test Typography
*/
::-moz-selection { background: #ffc000; }
::selection { background: #ffc000; }
/************************/
@byee01
byee01 / dabblet.css
Created May 8, 2012 20:11
Brian's Test Typography
/**
* Brian's Test Typography
*/
::-moz-selection { background: #ffc000; }
::selection { background: #ffc000; }
/************************/
@byee01
byee01 / gist:1796023
Created February 11, 2012 03:57
JavaScript color clock from http://colorclock.nogoodatcoding.com/
$(document).ready(init);
var lastHex = 0xffffff;
var over60 = 256 / 60;
var over24 = 256 / 24;
var isAM = true;
function fontResizerInit() {
var originalFontSize = $('#timeval').css('font-size');
$(".resetFont").click(function () {
$('#timeval,#hexval,#am,#pm,#toggletime,#togglehex').css('font-size', originalFontSize);
@byee01
byee01 / gist:1713677
Created January 31, 2012 23:10
Tape effect in CSS
.images figure {
position: relative;
}
.images figure:before {
content: "";
position: absolute;
top: -15px;
right: 80px;
width: 130px;
@byee01
byee01 / piezo.java
Created October 18, 2011 01:22
Music Arduino Experiment
/* Melody
* (cleft) 2005 D. Cuartielles for K3
*
* This example uses a piezo speaker to play melodies. It sends
* a square wave of the appropriate frequency to the piezo, generating
* the corresponding tone.
*
* The calculation of the tones is made following the mathematical
* operation:
*
@byee01
byee01 / assignment.js
Created September 15, 2011 20:54
F12 67-328 Lab 1 - This gives you some clues about the parameters to expect based off of Google Closure's JS docs (http://code.google.com/closure/compiler/docs/js-for-compiler.html). Email brian.a.yee@gmail.com if you have any questions or leave a comment
/**
* TASK 1 - Create a basic calculator
*
* Create a function that takes 3 arguments: operator, operand1, operand2
* operator can be "add" "subtract" "multiply" or "divide"
* return the result of the operation on the operands
* return null if the operator argument is not one of the 4
* no other errors or exceptions need to be handled
* use a switch statement to choose the right operator
*
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
Document doc = db.parse(new URL(url).openStream());
Array tweet1 = getTweet(u1).split(); // ["word", "word", "word"]
Array tweet2 = getTweet(u2).split(); // ["word", "word", "word"]
StringBuilder mashedTweet = new StringBuilder();
mashedTweet.append(tweet1[0]);
@byee01
byee01 / continuousTimer.as
Created September 28, 2010 16:02
Some quick code to call a function continuously in Flash or Flex. Don't forget that the redraw function, since it is an event listener, takes in the TimerEvent as a parameter.
// t is a timer that calls redraw() every 1 second indefinitely
t = new Timer(1000,0);
t.addEventListener(TimerEvent.TIMER, redraw);
t.start();