Sometimes you want to ignore certain files when you run git diff
, but you still want to check them
in, which means you can't capitalize on .gitignore
.
This guide is here to help.
How to set it up?
sudo apt install git vim-gtk && \ | |
mkdir ~/git && \ | |
cd ~/git && \ | |
git clone https://gitee.com/kirkkt/text-files-2019.git text-files && \ | |
cd ~ && \ | |
sh ~/git/text-files/bash/install-linux.sh |
const clearScreen = () => { | |
const readline = require('readline') | |
const blank = '\n'.repeat(process.stdout.rows) | |
console.log(blank) | |
readline.cursorTo(process.stdout, 0, 0) | |
readline.clearScreenDown(process.stdout) | |
} | |
const renderContent = (lines, highlightIndex, moveMode) => { | |
clearScreen() |
const partners = [ | |
{ | |
"id": 1, | |
"urlName": "balance-at-work", | |
"organization": "Balance at Work", | |
"customerLocations": "across Australia, Pacific and Oceania", | |
"willWorkRemotely": true, | |
"website": "http://www.balanceatwork.com.au/", | |
"services": "At Balance at Work, we want to help you make work a joy for your employees and you! We specialize in leadership development, talent management and career coaching, and use Spidergap as one of our tools to help employees focus their development and achieve more.", | |
"offices": [ |
/* | |
Write a function called deepClone which takes an object and creates a copy of it. e.g. {name: "Paddy", address: {town: "Lerum", country: "Sweden"}} -> {name: "Paddy", address: {town: "Lerum", country: "Sweden"}} | |
*/ | |
const deepClone = entity => { | |
if (entity === null) { | |
return null | |
} | |
if (entity instanceof Function) { | |
return entity |
/** | |
Write some code, that will flatten an array of arbitrarily nested arrays of integers into a flat array of integers. e.g. [[1,2,[3]],4] -> [1,2,3,4]. | |
Your solution should be a link to a gist on gist.github.com with your implementation. | |
When writing this code, you can use any language you're comfortable with. The code must be well tested and documented if necessary, and in general please treat the quality of the code as if it was ready to ship to production. | |
Try to avoid using language defined methods like Ruby's Array#flatten.* | |
*/ | |
'use strict'; |
'use strict'; | |
/** | |
* run `node flattenArray.js` in order to run the tests | |
*/ | |
/** | |
* isDeepArray($array): returns whether $array is deep (containing subarrays): | |
* i.e.: | |
* [] -> false |