This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Theme | |
| background = #151515 | |
| foreground = #BCBCBC | |
| cursor-color = #BCBCBC | |
| cursor-style = block | |
| cursor-style-blink = false | |
| selection-background = #A6A6A6 | |
| selection-foreground = #202020 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <html> | |
| <body> | |
| <span id="output"></span> | |
| </body> | |
| <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> | |
| <script src="main.js"></script> | |
| </html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function () { | |
| // IndexedDB | |
| var indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB || window.OIndexedDB || window.msIndexedDB, | |
| IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction || window.OIDBTransaction || window.msIDBTransaction, | |
| dbVersion = 1.0; | |
| // Create/open database | |
| var request = indexedDB.open("elephantFiles", dbVersion), | |
| db, | |
| createObjectStore = function (dataBase) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const { optimize } = require('webpack') | |
| module.exports = { | |
| // webpack config... | |
| plugins: [ | |
| new optimize.UglifyJsPlugin({ | |
| beautify: false, | |
| output: { | |
| comments: false | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module.exports = { | |
| // webpack config... | |
| module: { | |
| loaders: [ | |
| // other loaders... | |
| { | |
| test: /\.pug$/, | |
| loaders: [ | |
| 'html-loader', { | |
| loader: 'pug-html-loader', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const { AotPlugin } = require('@ngtools/webpack') | |
| module.exports = { | |
| // webpack config... | |
| plugins: [ | |
| new AotPlugin({ | |
| tsConfigPath: './src/tsconfig.app.json', | |
| mainPath: path.resolve(__dirname, 'src', 'main.ts'), | |
| skipCodeGeneration: true // Toggle for AOT compilation | |
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env node | |
| 'use strict' | |
| const exec = require('child_process').exec | |
| const fs = require('fs') | |
| const eslint = require('../node_modules/eslint/lib/cli') | |
| let files | |
| let child = exec("git diff-index --cached --name-only HEAD", (error, stdout, stderr) => { | |
| files = stdout.split('\n').filter((i) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function coroutine () { | |
| return new Promise((resolve, reject) => { | |
| var args = Array.prototype.slice.call(arguments) | |
| var fn = args.shift() | |
| var gen = fn.apply(this, args) | |
| function next (er, res) { | |
| var c = gen.next(res) | |
| if (c.done) { | |
| resolve(c.value) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 'use strict'; | |
| const Promise = require('bluebird'); | |
| function someAsyncTask() { | |
| return new Promise(function(resolve) { | |
| let delay = Math.floor(Math.random() * 10000); | |
| setTimeout(function () { | |
| resolve(delay); |