Skip to content

Instantly share code, notes, and snippets.

View chemoish's full-sized avatar

Carey Hinoki chemoish

  • Huntington Beach, CA
View GitHub Profile
@chemoish
chemoish / index.html
Created October 30, 2012 04:19
A CodePen by Carey Hinoki. Carey's Casino - Poker Timer with increasing blinds.
<div id="poker_clock" class="clearfix">
<h1>~ Carey's Casino ~</h1>
<div id="poker_play_pause">
<span>Play/Pause</span>
<a href="#" title="Play/Pause" class="play">
<span></span>
</a>
</div>
@chemoish
chemoish / index.html
Created October 30, 2012 04:35
A CodePen by Carey Hinoki. Tic-Tac-Toe - The first interview question I give out is to make TTT in 15 minutes. The only person that has finished it in my company / all interviewees is me. One day everyone decided to one up the basic TTT problem... So thi
<canvas id="game" width="600" height="600"></canvas>
@chemoish
chemoish / script.js
Last active December 9, 2015 20:39
A CodePen by Carey Hinoki. Session Timeout
function debounce(func, threshold) {
var timeout;
return function() {
var context = this,
args = arguments;
if (timeout) {
clearTimeout(timeout);
}
@chemoish
chemoish / index.html
Created April 16, 2013 00:41
A CodePen by Carey Hinoki. Validate - A client-side validation plugin for Twitter Bootstrap 2.3.1
<!DOCTYPE html>
<html>
<head>
<link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-combined.min.css" rel="stylesheet">
<link href="//netdna.bootstrapcdn.com/font-awesome/3.0.2/css/font-awesome.css" rel="stylesheet">
</head>
<body>
<div class="container">
<section>
<div class="page-header">
@chemoish
chemoish / core.js
Last active December 21, 2015 20:10
Light JS framework
/**
* Define console.log if doesn't exist
* Add a wrapper around console.log
*
* usage: log('inside coolFunc',this,arguments);
* http://paulirish.com/2009/log-a-lightweight-wrapper-for-consolelog/
*/
if (typeof console === "undefined"){
window.console = {};
window.console.log = function(){};
@chemoish
chemoish / Report.js
Created August 27, 2013 22:31
Ext Sample
Ext.define('PICS.model.report.Report', {
extend: 'Ext.data.Model',
requires: [
'PICS.model.report.Column',
'PICS.model.report.Filter',
'PICS.model.report.Sort'
],
fields: [{
name: 'type',
###
1. Click on element
2. Load the locales
angular.element($0).injector().get("geLocale").load("en-gb")
angular.element($0).injector().get("geLocale").load("en-us")
3. Locale of ngLocale should be set at en-us since that was the last loaded locale
@chemoish
chemoish / gist:9671600
Created March 20, 2014 19:14
A gist of how to embed a gist in a gist...
$.ajax({
url: 'https://gist.github.com/chemoish/9671600.json?callback=loadGist',
dataType: 'jsonp',
success: function (data, textStatus, jqXHR) {
document.write('<link rel="stylesheet" href="//gist.github.com' + data.stylesheet + '" />');
document.write(data.div);
}
});
@chemoish
chemoish / gist:11018035
Created April 18, 2014 00:00
So I already found a goo.gl code, but my coworkers did not... Here is what I whipped up to help him...
updateIframe = function (href, key) {
if ($('#scrape').length == 0) {
$('body').append('<iframe id="scrape">');
}
console.warn('<iframe id="scrape" src="' + href + '">');
$('#scrape').replaceWith('<iframe id="scrape" src="' + href + '">');
setTimeout(function () {
@chemoish
chemoish / gist:11408999
Last active August 29, 2015 14:00
Simple grunt bump task.
###
@name Bump Stage
@description
Create tags for stage environment based on alias. Note: the tag is missing a prefix of 'v'
due to a limitation of debian packaging.
@param dry-run Log out next stage tag
@example
grunt tag:stage --dry-run