Homebrew is a great little package manager for OS X. If you haven't already, installing it is pretty easy:
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"| function triangle(num) { | |
| var result = [[1], [1,1]]; | |
| for (var j = 0; j < num; j++) { | |
| // console.log('previousArr', result[result.length-1]); | |
| var previousArr = result[result.length-1]; | |
| var tempArr = []; | |
| // for each element of previous array | |
| for (var i = 0; i < previousArr.length ; i++) { |
| /** | |
| * Write a function that, given two objects, returns whether or not the two | |
| * are deeply equivalent--meaning the structure of the two objects is the | |
| * same, and so is the structure of each of their corresponding descendants. | |
| * | |
| * Examples: | |
| * | |
| * deepEquals({a:1, b: {c:3}},{a:1, b: {c:3}}); // true | |
| * deepEquals({a:1, b: {c:5}},{a:1, b: {c:6}}); // false | |
| * |
| sudo apt update | |
| sudo apt dist-upgrade -y | |
| sudo apt install -y vim-tiny openjdk-8-jre-headless | |
| curl https://www.apache.org/dist/cassandra/KEYS | sudo apt-key add - | |
| sudo apt-key adv --keyserver pool.sks-keyservers.net --recv-key A278B781FE4B2BDA | |
| echo "deb http://www.apache.org/dist/cassandra/debian 22x main" | sudo tee -a /etc/apt/sources.list.d/cassandra.sources.list | |
| echo "deb-src http://www.apache.org/dist/cassandra/debian 22x main" | sudo tee -a /etc/apt/sources.list.d/cassandra.sources.list | |
| gpg --keyserver pgp.mit.edu --recv-keys F758CE318D77295D | |
| gpg --export --armor F758CE318D77295D | sudo apt-key add - | |
| gpg --keyserver pgp.mit.edu --recv-keys 2B5C1B00 |
| Latency Comparison Numbers | |
| -------------------------- | |
| L1 cache reference 0.5 ns | |
| Branch mispredict 5 ns | |
| L2 cache reference 7 ns 14x L1 cache | |
| Mutex lock/unlock 25 ns | |
| Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
| Compress 1K bytes with Zippy 3,000 ns 3 us | |
| Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
| Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
| SET FOREIGN_KEY_CHECKS = 0; | |
| TRUNCATE table $table_name; | |
| SET FOREIGN_KEY_CHECKS = 1; |
| function isLeft(char) { | |
| return (char === "(" || char === "[" || char === "{") ? true : false; | |
| } | |
| function isValidPair(str) { | |
| str.split(""); | |
| var stack =[]; | |
| var pairs = {")": "(", "]": "[", "}": "{"}; | |
| if (str.length <= 1) { |
| * Tic Tac Toe | |
| * Connect Four | |
| * Blackjack | |
| * Priority Queueing/Dequeing | |
| * Calculate State and Federal taxes (Marginal brackets make it harder than you think) | |
| * Create-React-App commenting tool | |
| * Basic Keyword search via API call | |
| * Build a calculator with UI | |
| * Merge Sort | |
| * Calculate the angle between two clock hands if given the time |
| Learning Data Structures and Algorithms: https://player.oreilly.com/videos/9781771373470 | |
| git fetch origin -- to get all the remote branches | |
| git pull origin develop -- to ensure your development branch is fully up to date. The response should be up to date, but you never know | |
| git checkout release/X.XX -- to choose release/X.XX as your base branch | |
| git pull – to update the release branch again because you never know what your colleagues are doing | |
| git checkout -b X.XX-hotfix/JIRA-9999 -- to cut a new branch off release/X.XX base branch | |
| git cherry-pick SHA1 -- cherry pick SHA in order to apply them. This is the first SHA to apply. | |
| git cherry-pick SHA2 -- cherry pick the second SHA to apply | |
| git push origin X.XX-hotfix/JIRA-9999 -- push cherry picked commits |