Standard escape codes are prefixed with Escape:
- Ctrl-Key:
^[ - Octal:
\033 - Unicode:
\u001b - Hexadecimal:
\x1B - Decimal:
27
| #include <stdint.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| // munged from https://github.com/simontime/Resead | |
| namespace sead | |
| { | |
| class Random | |
| { |
I've been using create-react-app lately as I find it very useful to kick things off while starting a project. I almost always follow JavaScript Standard Style and I found myself googling it so I figured out I should write it down.
I really like keeping dependencies as local as possible but if you prefer you can install it globally.
yarn add standard --devor
| // Gulp | |
| import gulp from 'gulp'; | |
| import plumber from 'gulp-plumber'; | |
| import file from 'gulp-file'; | |
| import filter from 'gulp-filter'; | |
| import rename from 'gulp-rename'; | |
| import sourcemaps from 'gulp-sourcemaps'; | |
| import uglify from 'gulp-uglify'; | |
| // Rollup | |
| import { rollup } from 'rollup'; |
์ ๋์ฝ๋์์ ํ๊ธ์ ์ด๋ป๊ฒ ๋ค๋ฃจ๋์ง๋ฅผ ์ ๋ฆฌํ์๋ค.
| var gulp = require('gulp'); | |
| var sourcemaps = require('gulp-sourcemaps'); | |
| var source = require('vinyl-source-stream'); | |
| var buffer = require('vinyl-buffer'); | |
| var browserify = require('browserify'); | |
| var watchify = require('watchify'); | |
| var babel = require('babelify'); | |
| function compile(watch) { | |
| var bundler = watchify(browserify('./src/index.js', { debug: true }).transform(babel)); |
| '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'); |
These rules are adopted from the AngularJS commit conventions.
| (function($) | |
| { | |
| $.fn.hasClassRegEx = function(regex) | |
| { | |
| var classes = $(this).attr('class'); | |
| if(!classes || !regex){ return false; } | |
| classes = classes.split(' '); | |
| var len = classes.length; |