Skip to content

Instantly share code, notes, and snippets.

@zxqx
zxqx / example.html
Last active February 23, 2016 03:26
example.html
<!doctype html>
<html>
<head>
</head>
<body>
Some bullshit content
<script src="./your-script.js"></script>
</body>
</html>
@zxqx
zxqx / unit-test.js
Last active April 8, 2016 21:44
unit-test.js
// ------------------------------------------
// square-number.js
// ------------------------------------------
module.exports = squareNumber;
function squareNumber(number)
{
return number * number;
}
@zxqx
zxqx / compile-less.js
Created February 25, 2016 18:58
Compile a collection of stringified LESS styles directly in the browser
/**
* Compile a collection of stringified LESS styles directly in the browser
* @param {string} less
*
* e.g. compileLess('body { div { border: 2px solid aqua; } }');
*/
function compileLess(less)
{
var style = document.createElement('style');
style.type = 'text/less';
@zxqx
zxqx / App.js
Last active March 12, 2016 06:42
import React, { Component } from 'react';
import { connect } from 'react-redux';
import Header from '../../components/header';
import { attemptUserAuthentication, logoutAndRedirect } from '../../actions/auth';
import { getUserInfo, sendConfirmationEmail } from '../../actions/users';
@connect(state => ({
auth: state.auth,
users: state.users
}))
@zxqx
zxqx / chart.json
Last active October 3, 2018 19:26
{
"components": [
{
"id": "weight-component",
"period": {
"start_date": "2018-08-04T20:36:00Z",
"end_date": "2018-09-02T23:59:59Z"
},
"links": [
{
{
"components": [
{
"id": "glucose-component",
"period": {
"start_date": "2018-07-11T00:00:00Z",
"end_date": "2018-08-10T23:59:59Z"
},
"links": [
{
{
"components": [
{
"id": "glucose-component",
"period": {
"start_date": "2018-07-11T00:00:00Z",
"end_date": "2018-08-10T23:59:59Z"
},
"links": [
{