Skip to content

Instantly share code, notes, and snippets.


Thiago Lagden lagden

Block or report user

Report or block lagden

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
lagden / a.mjs
Created Aug 3, 2018
ECMAScript Modules (import/export)
View a.mjs
const a = 'a'
export default a
View index.html
<!DOCTYPE html>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,minimum-scale=1,maximum-scale=1">
<link href="./agrega/main.css" rel="stylesheet" type="text/css">
<!-- Folha de estilo do iframe do Nimble + FormAgrega -->
lagden / data.sql
Last active Nov 28, 2017
Using mysql module
View data.sql
-- MySQL dump 10.13 Distrib 5.7.16, for osx10.11 (x86_64)
-- Host: localhost Database: consulta_veiculo
-- ------------------------------------------------------
-- Server version 5.7.16
/*!40101 SET NAMES utf8 */;
lagden /
Created Aug 22, 2017 — forked from paullewis/
TypeScript + RxJS + Closure Compiler setup

I'm just going to make a note of this for Future Paul, because I spent way too long trying to get this working. If anyone has a better version of this workflow let me know.

Here's the rough idea:

  1. Have some TypeScript
  2. With some RxJS. Only include the bits of RxJS that we actually need because bundle sizes.
  3. Combine to a bundle using Closure Compiler (because it's super good at crushing down JS).

Because Future Paul will want it, here's the installs needed:

lagden / counter-mobx-react.js
Created Jan 21, 2017
Test react mobx state animation
View counter-mobx-react.js
import React, {Component} from 'react'
import {render} from 'react-dom'
import {TweenMax, Linear} from 'gsap'
import RoundPropsPlugin from 'gsap/RoundPropsPlugin'
import {observable, action, useStrict} from 'mobx'
import {observer} from 'mobx-react'
import DevTools from 'mobx-react-devtools'
lagden / server.js
Created Nov 10, 2016
Puro Server - Node.js
View server.js
'use strict'
const fs = require('fs')
const path = require('path')
const http = require('http')
const url = require('url')
const crypto = require('crypto')
const mimeTypes = require('mime-types')
const debug = require('debug')
View index.jade
input.switchSlide__radio-0#concessionaria_0(name='concessionaria' type='radio' value='0' required)
input.switchSlide__radio-1#concessionaria_1(name='concessionaria' type='radio' value='1' required)
label(for='concessionaria_0') Não
label(for='concessionaria_1') Sim
lagden / for1.js
Last active Aug 1, 2016
Benchmark cache length
View for1.js
function for1() {
'use strict';
const a = [];
for (let i = 0; i < 9999999; i++) {
for (let c = 0; c < 1e3; c++) {
View gist:522be64213455c25ceaf
<svg preserveAspectRatio="xMinYMin" version="1.1" xmlns="" xmlns:xlink=""
viewBox="0 0 560 1388">
<mask id="canTopMask">
<image width="560" height="1388" xlink:href="img/can-top-alpha.png"></image>
<image mask="url(#canTopMask)" id="canTop" width="560" height="1388" xlink:href="can-top.jpg"></image>
lagden / qs.js
Created Jun 29, 2015
query string to javascript object
View qs.js
/* globals console */
'use strict';
function parseQS(str) {
var strArr = String(str)
.replace(/^&/, '')
.replace(/&$/, '')
var sal = strArr.length;
var i;
You can’t perform that action at this time.