This file contains 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
git diff --name-only HEAD | xargs -I$0 npx prettier --write $0 |
This file contains 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 add(a, b) { | |
a = a.toString(); | |
b = b.toString(); | |
const re = /^-/; | |
if (re.test(a) && re.test(b)) { | |
a = a.substring(1); | |
b = a.substring(1); | |
} else if(re.test(a)) { | |
a = a.substring(1); |
This file contains 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
--- themes/little-code-bricks/source/css/prism.css 2018-08-17 22:04:12.000000000 +0900 | |
+++ themes/little-code-bricks/source/css/prism-default-a11.css 2018-08-17 22:05:53.000000000 +0900 | |
@@ -71,11 +71,11 @@ | |
.token.prolog, | |
.token.doctype, | |
.token.cdata { | |
- color: slategray; | |
+ color: #5f6d7b; | |
} | |
This file contains 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
/* PrismJS 1.9.0 | |
http://prismjs.com/download.html?themes=prism&languages=markup+css+clike+javascript+bash+ruby+diff+json+perl+python+jsx+scss+swift+typescript&plugins=line-numbers */ | |
/** | |
* prism.js default theme plus contrast for a11y | |
* Based on default theme, dabblet (http://dabblet.com) | |
* @author Lea Verou | |
*/ | |
code[class*="language-"], | |
pre[class*="language-"] { |
This file contains 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 test(method, array, showArray){ | |
let arrayLength; | |
if (typeof array === 'number') { | |
arrayLength = array; | |
array = []; | |
for (let i=0; i<arrayLength; i++) { | |
array.push(Math.floor(Math.random()*10000)); | |
} | |
} else { | |
arrayLength = array.length; |
This file contains 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 stringHash = require("string-hash"); | |
module.exports = class MyHashTable { | |
constructor(numberOfBucket) { | |
this.numberOfBucket = parseInt(numberOfBucket, 10); | |
this.hashTable = new Array(this.numberOfBucket); | |
} | |
get(key) { | |
key = '' + key; | |
const hashTableIndex = this.getHashTableIndex(key); |
This file contains 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
diff --git a/tools/build/es5build.js b/tools/build/es5build.js | |
index b16f9d9..25b5ae6 100755 | |
--- a/tools/build/es5build.js | |
+++ b/tools/build/es5build.js | |
@@ -56,7 +56,10 @@ function run(config) { | |
.pipe(sourcemaps.init()) | |
.pipe(through2.obj(function(file, encoding, done) { | |
var self = this; | |
- fs.readFile(file.path.replace('.js', '.map'), function(error, buffer) { | |
+ var filePath = file.path.replace('.js', '.map'); |
This file contains 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 = function (grunt) { | |
// Please see the Grunt documentation for more information regarding task | |
// creation: http://gruntjs.com/creating-tasks | |
'use strict'; | |
grunt.registerMultiTask('useXCAssets', 'operating node-xcode', function () { | |
var xcode = require('xcode'); | |
var _ = require('lodash') || grunt.util._; | |
var fs = require('fs'); |
This file contains 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 = function (grunt) { | |
// Please see the Grunt documentation for more information regarding task | |
// creation: http://gruntjs.com/creating-tasks | |
'use strict'; | |
grunt.registerMultiTask('nodexcode', 'operating node-xcode', function () { | |
var xcode = require('xcode'); | |
var _ = require('lodash') || grunt.util._; | |
var fs = require('fs'); |