One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
| const arr1 = [1,2,3] | |
| const arr2 = [4,5,6] | |
| const arr3 = [...arr1, ...arr2] //arr3 ==> [1,2,3,4,5,6] |
| import fs from 'fs'; | |
| import path from 'path'; | |
| const convert = (imgPath) => { | |
| // read image file | |
| fs.readFile(imgPath, (err, data)=>{ | |
| // error handle | |
| if(err) { | |
| throw err; | |
| } |
| /** | |
| * Save file splitting it by chunks of 9M | |
| * @param {Blob} FileBlob blob data to save | |
| * @param {Folder} folder destination folder | |
| * @param {Number} chunkSize | |
| * @return {String} | |
| */ | |
| function saveFileByChunks(fileBlob, folder, chunkSize) { | |
| var | |
| fileName = new Date().getTime(), |
| #!/usr/bin/python | |
| # -*- coding: utf-8 -*- | |
| import sublime_plugin | |
| import subprocess | |
| from time import sleep | |
| import sys | |
| cl = lambda line: subprocess.Popen(line, shell=True, stdout=subprocess.PIPE).communicate()[0].strip() | |
| log = lambda message: sys.stderr.write("Log: %s\n" % message) |
| # | |
| # If all files excluded and you will include only specific sub-directories | |
| # the parent path must matched before. | |
| # | |
| /** | |
| !/.gitignore | |
| ############################### | |
| # Un-ignore the affected subdirectory |
| You can create a new empty branch like this: | |
| $ git checkout --orphan NEWBRANCH | |
| --orphan creates a new branch, but it starts without any commit. After running the above command you are on a new branch "NEWBRANCH", and the first commit you create from this state will start a new history without any ancestry. | |
| The --orphan command keeps the index and the working tree files intact in order to make it convenient for creating a new history whose trees resemble the ones from the original branch. | |
| Since you want to create a new empty branch that has nothing to do with the original branch, you can delete all files in the new working directory: |
| // # Mocha Guide to Testing | |
| // Objective is to explain describe(), it(), and before()/etc hooks | |
| // 1. `describe()` is merely for grouping, which you can nest as deep | |
| // 2. `it()` is a test case | |
| // 3. `before()`, `beforeEach()`, `after()`, `afterEach()` are hooks to run | |
| // before/after first/each it() or describe(). | |
| // | |
| // Which means, `before()` is run before first it()/describe() |
| #!/usr/bin/env bash | |
| # MIT © Sindre Sorhus - sindresorhus.com | |
| # git hook to run a command after `git pull` if a specified file was changed | |
| # Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`. | |
| changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)" | |
| check_run() { | |
| echo "$changed_files" | grep --quiet "$1" && eval "$2" |