Skip to content

Instantly share code, notes, and snippets.

View tawanorg's full-sized avatar
🎯
Focusing

Tew Tawan tawanorg

🎯
Focusing
View GitHub Profile
@sogko
sogko / app.js
Last active November 8, 2022 12:31
gulp + expressjs + nodemon + browser-sync
'use strict';
// simple express server
var express = require('express');
var app = express();
var router = express.Router();
app.use(express.static('public'));
app.get('/', function(req, res) {
res.sendfile('./public/index.html');
@armand1m
armand1m / Dockerfile
Last active March 10, 2024 14:54
Yarn cache compatible Dockerfile
FROM alpine
RUN apk add --update --no-cache nodejs
RUN npm i -g yarn
ADD package.json yarn.lock /tmp/
ADD .yarn-cache.tgz /
RUN cd /tmp && yarn
RUN mkdir -p /service && cd /service && ln -s /tmp/node_modules
@Jpoliachik
Jpoliachik / AppDelegate.m
Created December 19, 2016 15:25
ReactNative iOS Launch Screen No Flash
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// 1. init window
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
UIViewController *rootViewController = [UIViewController new];
// 2. backgroundView using LaunchScreen.xib
UIView *backgroundView = [[[NSBundle mainBundle] loadNibNamed:@"LaunchScreen" owner:self options:nil] firstObject];
backgroundView.frame = self.window.bounds;
@granmoe
granmoe / __responsive styled components
Last active January 6, 2021 02:22
Programmatically create responsive styled components with react and styled-components
// this file is just here to change the name of the gist
import React from 'react'
import styled from 'styled-components'
const makeResponsiveComponent = (rulesets, tagName = 'div') =>
styled(tagName)`${buildStyles(rulesets)}`
const buildStyles = rulesets =>
rulesets.reduce(
(cssString, { constraint, width, rules }) =>