Skip to content

Instantly share code, notes, and snippets.

View drGrove's full-sized avatar
😎
Trying to delete more lines of code than I write

Danny Grove drGrove

😎
Trying to delete more lines of code than I write
View GitHub Profile
'use strict'
$(function(){
var manipulateDom = function(options) {
$.each(options.DivIds, function(index, id){
$("#" + id).css('height', options.height);
});
}
});
@drGrove
drGrove / gist:7414327
Last active December 28, 2015 00:29
jQuery read more
<div class="resort_class" data-resortId="<?= $resort->id; ?>">
fsjdffjkdlafjsda;ldfjsda;<span class="readMore">Read More</span>
<div class="moreToRead">afdjfaskjfd;ajfdkl;ajcjawkl;jeakl;fe</div>
</div>
<script type="text/javascript">
$(function(){
$(".readMore).on('click, function(){
$this = $(this);
@drGrove
drGrove / gist:9494831
Last active August 29, 2015 13:57
Keybase Proof
### Keybase proof
I hereby claim:
* I am drGrove on github.
* I am drgrove (https://keybase.io/drgrove) on keybase.
* I have a public key whose fingerprint is 6310 F7C2 70D4 E082 BCE1 AAE3 F666 BEF2 E618 4E29
To claim this, I am signing this object:
@drGrove
drGrove / glass.html
Last active August 29, 2015 13:57
[wearscript] Wearscript is Awesome!
<html style="width:100%; height:100%; overflow:hidden" data-test>
<head>
<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/zepto/1.0/zepto.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.2/underscore-min.js"></script>-->
</head>
<body style="width:100%; height:100%; overflow:hidden; margin:0">
<canvas id="canvas" width="640" height="360" style="display:block"></canvas>
<script>
WS.log('Welcome to WearScript');
WS.say('Wearscript is awesome');
@drGrove
drGrove / awesomeConfig
Created March 13, 2014 16:37
Capscr [awesome]
-- capture screen area
awful.key({ modkey, "Control" }, "p", function() awful.util.spawn(".bin/capscr") end)
@drGrove
drGrove / ghhgf
Last active August 29, 2015 13:57
[wearscript] Welcome to Wearscript
jsklsj
@drGrove
drGrove / glass.html
Created March 19, 2014 18:10
[wearscript] djljlk
<html style="width:100%; height:100%; overflow:hidden">
<head>
<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/zepto/1.0/zepto.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.2/underscore-min.js"></script>-->
</head>
<body style="width:100%; height:100%; overflow:hidden; margin:0">
<canvas id="canvas" width="640" height="360" style="display:block"></canvas>
<script>
function cb(data) {
// Changes canvas color with head rotation
@drGrove
drGrove / glass.html
Created March 20, 2014 19:49
[wearscript] sdfsdfdsf
<html style="width:100%; height:100%; overflow:hidden">
<head>
<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/zepto/1.0/zepto.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.2/underscore-min.js"></script>-->
</head>
<body style="width:100%; height:100%; overflow:hidden; margin:0">
<canvas id="canvas" width="640" height="360" style="display:block"></canvas>
<script>
WS.log('Welcome to WearScript');
WS.say('Welcome to WearScript');
@drGrove
drGrove / glass.html
Created March 20, 2014 20:15
[wearscript] sdfsdfdsf
<html style="width:100%; height:100%; overflow:hidden">
<head>
<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/zepto/1.0/zepto.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.2/underscore-min.js"></script>-->
</head>
<body style="width:100%; height:100%; overflow:hidden; margin:0">
<canvas id="canvas" width="640" height="360" style="display:block"></canvas>
<script>
function cb(data) {
// Changes canvas color with head rotation
@drGrove
drGrove / glass.html
Created March 21, 2014 03:22 — forked from bwhite/glass.html
[wearscript] AR Warp with circles
<html style="width:100%; height:100%; overflow:hidden">
<body style="width:100%; height:100%; overflow:hidden; margin:0">
<canvas id="offscreen" width="640" height="360" style="display:hidden"></canvas>
<script>
function drawCircle(x, y) {
var width = 640;
var height = 360;
var c = document.getElementById("offscreen");
var ctx = c.getContext("2d");
ctx.fillStyle = 'black'