Skip to content

Instantly share code, notes, and snippets.

Mana Tinratreengam mtinra

  • Phuket, Thailand
View GitHub Profile
mtinra /
Created Aug 3, 2019 — forked from addyosmani/
108 byte CSS Layout Debugger

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

mtinra / index.js
Last active May 2, 2019
basic express server with CORS header
View index.js
const express = require("express");
const app = express();
const port = process.env.SERVER_PORT || 3000;
app.use(function(req, res, next) {
res.header("Access-Control-Allow-Origin", "*");
"Origin, X-Requested-With, Content-Type, Accept"
mtinra / index.html
Last active May 2, 2019
XMLHttpRequest for CORS
View index.html
const request = new XMLHttpRequest();
const url = '';
function CORSTesting() {
if(request) {'GET', url, true);
View Find and replace in chrome dev
mtinra / cognito.yaml
Last active Jun 23, 2018 — forked from singledigit/cognito.yaml
Create a Cognito Authentication Backend via CloudFormation
View cognito.yaml
AWSTemplateFormatVersion: '2010-09-09'
Description: Cognito Stack
Type: String
Description: Unique Auth Name for Cognito Resources
Type: String
Despription: API Gateway ID
mtinra / grid-pile-stacking-css-grids-for-impossible-layouts.markdown
Created Jun 3, 2018
GRID PILE: Stacking CSS Grids for Impossible Layouts
View grid-pile-stacking-css-grids-for-impossible-layouts.markdown
View center-everything.css
.container {
display: flex;
align-items: center;
justify-content: center;
mtinra / .env
Last active Aug 11, 2017
Sequelize config files for connect to SSL server at Heroku progresql
View .env
DATABASE_PATH = postgres://user:pass@localhost:5432/dbname
mtinra / async.js
Last active Jul 31, 2017
Async Await sample with fetch function
View async.js
// Fetch is return promise
// function fetchAlmbums() {
// fetch('')
// .then(res => res.json())
// .then(json => console.log(json));
// }
// fetchAlmbums();
const fetchAlmbums = async () => {
You can’t perform that action at this time.