Skip to content

Instantly share code, notes, and snippets.

View export-mike's full-sized avatar
📱
GO, React, React Native, Node.js in Syndey Australia

Mike James export-mike

📱
GO, React, React Native, Node.js in Syndey Australia
View GitHub Profile
@export-mike
export-mike / gist:07ab376dd666545c64c0
Created February 27, 2015 16:44
A simple hide and show printable areas. see example on jsfiddle: http://jsfiddle.net/57tyc9kj/
(function ($) {
$('.print-me').on('click', function () {
var $areaToPrint = $($(this).data('print-me'));
var $hiddenAreas = $('.hide-print');
if ($areaToPrint.length) {
$hiddenAreas.hide();
$areaToPrint.show();
window.print();
$hiddenAreas.show();
@export-mike
export-mike / intel.realsense.clean.js
Created October 27, 2015 16:33
intel.realsense.clean.js no logging. well most of it removed. use a consistent method of logging!
/*******************************************************************************
INTEL CORPORATION PROPRIETARY INFORMATION
This software is supplied under the terms of a license agreement or nondisclosure
agreement with Intel Corporation and may not be copied or disclosed except in
accordance with the terms of that agreement
@licence Copyright(c) 2014-2015 Intel Corporation. All Rights Reserved.
*******************************************************************************/
var intel = intel || {};
@export-mike
export-mike / SassMeister-input-HTML.html
Created January 20, 2014 15:09
Generated by SassMeister.com.
<body>
<div>
<a href="#">test</a>
</div>
</body>
@export-mike
export-mike / SassMeister-input-HTML.html
Created January 20, 2014 15:32
Generated by SassMeister.com.
<body>
<div>
<a href="#">test</a>
</div>
</body>
@export-mike
export-mike / SassMeister-input.scss
Created January 20, 2014 16:39
Generated by SassMeister.com.
// ----
// Sass (v3.3.0.rc.2)
// Compass (v1.0.0.alpha.17)
// ----
@import "compass";
$primary-color:red;
body{
@export-mike
export-mike / SassMeister-input.scss
Created January 21, 2014 09:34
Generated by SassMeister.com.
// ----
// Sass (v3.3.0.rc.2)
// Compass (v1.0.0.alpha.17)
// ----
@mixin box($color,$width:30px, $height:30px){
width:$width;
height:$height;
background-color:$color;
}
@export-mike
export-mike / SassMeister-input.scss
Created January 21, 2014 09:51
Generated by SassMeister.com.
// ----
// Sass (v3.3.0.rc.2)
// Compass (v1.0.0.alpha.17)
// ----
@import "compass";
$primary-color:red;
body{
@export-mike
export-mike / App.js
Last active January 14, 2016 16:31
TopLevel Stateless Component not updating with react transform, from
import React, { Component } from 'react';
import { NICE, SUPER_NICE } from './colors';
class Counter extends Component {
constructor(props) {
super(props);
this.state = { counter: 0 };
this.interval = setInterval(() => this.tick(), 1000);
}
@export-mike
export-mike / gist:322e6c340294113096b6
Last active January 24, 2016 11:54
Problems with babel anonymous functions becoming named breaks couchdb.
// Before transpile
couchDesignDoc('User', {
email: {
map: (doc) => {
if(doc.type === 'User') {
emit(doc.email, doc);
}
}
}
@export-mike
export-mike / tito-twitter-list
Last active February 13, 2016 23:55
lnug-tito-twitter-hook.io
module['exports'] = function titoTwitterList (hook) {
var body = hook.req.body;
var twitterAnswer = body.answers.filter(function (a) {
return a.question.title === 'Twitter';
})[0];
if (twitterAnswer && twitterAnswer.response) {