Skip to content

Instantly share code, notes, and snippets.

View hotmeteor's full-sized avatar
👾

Adam Campbell hotmeteor

👾
View GitHub Profile
@hotmeteor
hotmeteor / jquery.mobile.event.js
Created September 19, 2011 16:50 — forked from aaronrussell/jquery.mobile.event.js
Slightly modified version of jQuery Mobile's event handlers so can be used standalone without the rest of the framework
/*
* jQuery Mobile Framework : events
* Copyright (c) jQuery Project
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*/
(function($, undefined ) {
$.extend( $.support, {
orientation: "orientation" in window,
@hotmeteor
hotmeteor / gist:1683734
Created January 26, 2012 16:50 — forked from reinink/gist:1683466
Remove yellow background caused by Google Chrome autocomplete
if (navigator.userAgent.toLowerCase().indexOf("chrome") >= 0)
{
$(window).load(function()
{
$('input:-webkit-autofill').each(function()
{
var text = $(this).val();
var name = $(this).attr('name');
$(this).after(this.outerHTML).remove();
$('input[name=' + name + ']').val(text);
@hotmeteor
hotmeteor / vertical-enable.iscroll.js
Created March 29, 2012 00:55
Allow vertical scrolling on a horizontal iScroll (touch only)
var point, pointStartX, pointStartY, deltaX, deltaY;
var scroller = new iScroll('scrollerId', {
vScroll: false,
vScrollbar: false,
hScrollbar: false,
snap: 'li',
momentum: false,
onBeforeScrollStart: function(e) {
point = e.touches[0];
pointStartX = point.pageX;
@hotmeteor
hotmeteor / metadata.json
Created October 27, 2012 21:43
First run at a metadata.json file
/*
inspiration: https://twitter.com/jfsiii/status/261575761163599872
meta: https://github.com/h5bp/mobile-boilerplate/blob/master/index.html
metadata.json
*/
{
"version": "0.0.1",
"charset": "utf-8",
@hotmeteor
hotmeteor / _helpers.scss
Last active December 15, 2015 01:09
These are my common SCSS mixins and helpers. Requires bourbon (http://bourbon.io)
$buttons-list: '.btn',
'button',
'input[type=submit]',
'input[type=button]';
$unquoted-buttons-list: ();
@each $button-type in $buttons-list {
$unquoted-buttons-list: append($unquoted-buttons-list, unquote($button-type), comma);
}
<html>
<head>
<title>Animated Sparkline using SVG Path and d3.js</title>
<script src="https://raw.github.com/d3/d3.github.com/master/d3.v3.min.js"></script>
<style>
/* tell the SVG path to be a thin blue line without any area fill */
path {
stroke: steelblue;
stroke-width: 1;
fill: none;

Keybase proof

I hereby claim:

  • I am hotmeteor on github.
  • I am hotmeteor (https://keybase.io/hotmeteor) on keybase.
  • I have a public key whose fingerprint is 1BE8 85E5 5876 AAB3 F655 0EFD 8404 1CBA 05AE E58B

To claim this, I am signing this object:

@hotmeteor
hotmeteor / modal.html
Created March 16, 2014 15:55
Mobile-first CSS/HTML modal window
<!doctype html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>firstswim</title>
<meta name="description" content="">
//TODO: make this a module
/**
* # SockJS socket management service
*
* Creates SockJS socket connection to server, re-connects on disconnection,
* and exports hooks to map handlers for various data interactions.
*
*/
angular.module('app').factory
@hotmeteor
hotmeteor / data-replace.scss
Created March 31, 2014 15:21
Text replacer for smaller screens.
@media only screen and (max-width: 599px) {
[data-replace] {
display: inline-block;
overflow: hidden;
letter-spacing: -999em;
vertical-align: bottom;
&::before {
content: attr(data-replace);
letter-spacing: 0;