Skip to content

Instantly share code, notes, and snippets.

View teebot's full-sized avatar

Thibaut Nguyen teebot

View GitHub Profile
@teebot
teebot / gist:348afc1079c68e56fc93180f86fd246c
Created June 29, 2019 20:14
gzip all js and css files from build
find ./build -type f -name "*.css" -o -name "*.js" -exec gzip -k "{}" \;
@teebot
teebot / dev_setup_checklit.md
Last active December 19, 2018 17:27
Mac Dev setup check list

Auth

  • [] ssh keys
  • [] keychain

Tools

  • [] homebrew
  • [] xcode
  • [] xcode tools
  • [] upgrade git
@teebot
teebot / python_django_setup.md
Created October 25, 2018 07:41
Python django setup

Setup Python

brew install pyenv

Make sure your bashrc file initializes pyenv eval "$(pyenv init -)"

List python version pyenv install --list

@teebot
teebot / parcel_and_typescript_react.txt
Created April 26, 2018 09:29
Parcel and Typescript React
npm install -g parcel-bundler
npm init -y
npm i react react-dom @types/react @types/react-dom
tsc --init
======tsconfig.json=======
uncomment and set jsx to "react"
leave rest as default
@teebot
teebot / koa2-sass.ts
Created February 11, 2018 16:40
A typescript koa 2 sass middleware
import * as fs from 'fs';
import * as Koa from 'koa';
import * as sass from 'node-sass';
import * as path from 'path';
import * as url from 'url';
import * as util from 'util';
const sassRenderAsync = util.promisify(sass.render);
const fileExistsAsync = util.promisify(fs.exists);
export default (options: ISassOptions) => {
@teebot
teebot / gist:6cbe40ed91e09567e7ed8a9268911ff3
Created December 20, 2017 15:15
Delete firefox cert (when self signed certs fail)
find ~/Library/Application\ Support/Firefox -name '*.db' -delete
find . -name 'package-lock.json' -delete
node -e "require('http').createServer().listen(8086)"
@teebot
teebot / createLessFiles.js
Last active October 18, 2016 09:06
create a less file for each component
const glob = require('glob');
const fs = require('fs');
glob('**/*.component.ts', (err, files) => {
files.forEach((file) => {
let lessFileName = file.replace('.component.ts', '.less');
try {
fs.statSync(lessFileName);
}
catch (e) {
console.log(`Writing ${lessFileName}`);

Install node through https://github.com/coreybutler/nvm-windows

use latest node with nvm install latest

Install python 2.7

npm config set python python2.7

Install Visual Studio Community 2015 Edition. (Custom Install, Select Visual C++ during the installation)