Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html>
<body>
<select>
<optgroup label="Swedish Cars">
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
</optgroup>
<optgroup label="German Cars">
@JacobHsu
JacobHsu / HandlingPickerActions.html
Last active August 29, 2015 14:05
#Google Drive - Google Picker with Drive
<script>
var clientId = '720409271749-hqv3lb4u0q82t68vperem5oi3kosskol.apps.googleusercontent.com';
var developerKey = 'AIzaSyBTEWsJ4aXdoOzB4ey81eX9-ja7HejL4Qc';
var accessToken;
function onApiLoad() {
gapi.load('auth', authenticateWithGoogle);
gapi.load('picker');
}
function authenticateWithGoogle() {
window.gapi.auth.authorize({
@JacobHsu
JacobHsu / oop.php
Created August 15, 2014 15:14
#PHP
<!DOCTYPE html>
<html>
<head>
<title> Challenge Time! </title>
<link type='text/css' rel='stylesheet' href='style.css'/>
</head>
<body>
<p>
<?php
// Your code here
@JacobHsu
JacobHsu / OverrideParentMethods.php
Created August 16, 2014 07:44
#PHP :Overriding Parent Methods
<html>
<head>
<title>Override!</title>
</head>
<body>
<p>
<?php
class Vehicle {
public function honk() {
return "HONK HONK!";
@JacobHsu
JacobHsu / classConstant.php
Created August 18, 2014 07:59
#PHP :How to access class methods and properties
<html>
<head>
<title></title>
</head>
<body>
<p>
<?php
class Person{
public static function say(){
echo "Here are my thoughts!";
@JacobHsu
JacobHsu / AssociateArrays.php
Created August 19, 2014 07:36
#PHP -An associative array makes use of (key => value)
<html>
<head>
<title>Associate Arrays</title>
</head>
<body>
<p>
<?php
// This is an array using integers as the indices...
$myArray = array(2012, 'blue', 5);
@JacobHsu
JacobHsu / associativeArrayForeach.php
Created August 19, 2014 08:05
#PHP -associative array use the foreach loop.
<html>
<head>
<title>I am the King of Arrays!</title>
</head>
<body>
<p>
<?php
// On the line below, create your own associative array:
$myArray = array('one'=>'Jacob','two'=>2,'three'=>'King');
@JacobHsu
JacobHsu / index.html
Created September 1, 2014 06:46
#CSS Bordering on insanity // source http://jsbin.com/xohujofaxovo/1
<!DOCTYPE html>
<html>
<head>
<link type="text/css" rel="stylesheet" href="stylesheet.css"/>
<title></title>
<style id="jsbin-css">
/*Add your CSS below!*/
td{
height:50px;
border:1px dashed blue;
@JacobHsu
JacobHsu / index.html
Created September 2, 2014 01:54
#CSS Design a button // source http://jsbin.com/bokuzi/1
<!DOCTYPE html>
<html>
<head>
<link type="text/css" rel="stylesheet" href="stylesheet.css"/>
<title>About Me</title>
<style id="jsbin-css">
img {
display: block;
height: 100px;
width: 300px;
@JacobHsu
JacobHsu / index.html
Created September 3, 2014 06:47
#CSS - The Great Tree of HTML// source http://jsbin.com/nehat/1
<!DOCTYPE html>
<html>
<head>
<link type="text/css" rel="stylesheet" href="stylesheet.css"/>
<title>The Great Tree of HTML</title>
<style id="jsbin-css">
div {
border-radius: 5px;
border: 2px solid #6495ED;
background-color: #BCD2EE;