Skip to content

Instantly share code, notes, and snippets.

View lagden's full-sized avatar
🎯
Focusing

Thiago Magalhães lagden

🎯
Focusing
  • São Paulo
View GitHub Profile
@lagden
lagden / pkg-cli.js
Last active January 20, 2021 14:01
Update all dependencies and devDependencies to latest version in package.json
#!/usr/bin/env node
'use strict'
const {resolve} = require('path')
const {createWriteStream} = require('fs')
const {promisify} = require('util')
const child_process = require('child_process')
const exec = promisify(child_process.exec)
@lagden
lagden / index.html
Created November 21, 2012 05:40
A CodePen by Thiago Lagden. Infinite Carousel Responsive - jQuery - Oh yeahhh!! Another jQuery Carousel plugin!!
<div class="wrapper">
<a href="#nav" class="arrow prev">Prev</a>
<a href="#nav" class="arrow next">Next</a>
<ul class="slider">
<li>
<div class="caption">
<h1><a href="#lnk">1 - Sample</a></h1>
</div>
</li>
<li>
@lagden
lagden / a.mjs
Created August 3, 2018 20:00
ECMAScript Modules (import/export)
const a = 'a'
export default a
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Agrega</title>
<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 -->
<style>
@lagden
lagden / data.sql
Last active November 28, 2017 03:51
Using mysql module
-- 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 @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
<?php
require_once __DIR__ . '/../lib/vendor/Silex/silex.phar';
$app = new Silex\Application();
$app['debug'] = true;
// Registering Symfony\Yaml and Symfony\Config
$app['autoloader']->registerNamespace('Symfony', __DIR__.'/../lib/vendor/symfony/src');
@lagden
lagden / TypeScript+RxJS+Closure.md
Created August 22, 2017 06:14
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
lagden / counter-mobx-react.js
Created January 21, 2017 01:56
Test react mobx state animation
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'
useStrict(true)
@lagden
lagden / server.js
Created November 10, 2016 06:23
Puro Server - Node.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')
@lagden
lagden / index.jade
Created August 10, 2016 15:44
Switch
.switchSlide
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)
ul.switchSlide__widget
li.switchSlide__opt.switchSlide__opt-0
label(for='concessionaria_0') Não
li.switchSlide__opt.switchSlide__opt-1
label(for='concessionaria_1') Sim
.switchSlide