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 / input.scss
Created October 23, 2020 18:27
Generated by SassMeister.com.
$color-blue-5: #f2f8fd;
$color-blue-10: #e6f1fc;
$color-blue-20: #cce3f8;
$color-blue-30: #b3d4f5;
$color-blue-40: #99c6f1;
$color-blue-50: #80b8ee;
$color-gray-5: #f8f8f8;
$color-gray-10: #f1f1f2;
$color-gray-20: #e3e4e5;
@chemoish
chemoish / .gitconfig
Last active September 2, 2015 17:55
Git alias
[alias]
br = branch
co = checkout
st = status
rb = reset --mixed HEAD~1
tc = commit -m 'temp commit'
ls = log --pretty=format:"%C(green)%h\\ %C(yellow)[%ad]%C(red)%d\\ %C(reset)%s%C(blue)\\ [%cn]%C(reset)" --decorate --date=relative
ll = log --pretty=format:"%C(yellow)%h%C(red)%d\\ %C(reset)%s%C(blue)\\ [%cn]%C(reset)" --decorate --numstat
@chemoish
chemoish / gist:3c69fcd1cefd259e1bdf
Created June 6, 2014 02:33
findKeys method for underscore or lodash
# http://stackoverflow.com/questions/16987705/js-underscore-get-object-keys-for-filtered-values/21288437#21288437
_.mixin
findKeys: (obj, search, context) ->
result = []
isFunction = _.isFunction search
_.each obj, (value, key) ->
match = if isFunction then search.call(context, value, key, obj) else (value is search)
@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
@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: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);
}
});
###
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 / 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',
@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 / 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">