Skip to content

Instantly share code, notes, and snippets.

var salesTeam = [{name: {first: 'aleen', last: 'atkins'}, age: 26, sales: '$2314'},
{name: {first: 'alvaro', last: 'angelos'}, age: 55, sales: '$1668'},
{name: {first: 'denese', last: 'dossett'}, age: 29, sales: '$9248'},
{name: {first: 'douglas', last: 'denney'}, age: 53, sales: '$5058'},
{name: {first: 'earline', last: 'erickson'}, age: 19, sales: '$18876'},
{name: {first: 'herman', last: 'hazell'}, age: 25, sales: '$2746'},
{name: {first: 'homer', last: 'hirth'}, age: 26, sales: '$474'},
{name: {first: 'hwa', last: 'heidt'}, age: 53, sales: '$9607'},
{name: {first: 'hyon', last: 'hampshire'}, age: 46, sales: '$13598'},
{name: {first: 'issac', last: 'ingerson'}, age: 45, sales: '$5225'},
@d-kang
d-kang / gitflow1.md
Last active January 19, 2020 04:48

GIT WORKFLOW ONE: When you are ready to push your commits

  1. Make sure all changed files are committed on feature-branch
  2. Rebase on your feature-branch => git pull --rebase upstream master
  3. Switch to your master branch => git checkout master
  4. Rebase on your master => git pull --rebase upstream master
  5. If there are changes then push changes to master => git push origin master
  6. Go back to feature-branch => git checkout feature-branch
  7. Push changes from feature-branch to github => git push origin feature-branch

If a somones PR has been merged on github and you want to rebase:

  1. You would currently be working on your feature-branch. Do a git branch to check
  2. Do a git status and commit any of your unstaged changes
  3. Rebase from feature-branch => git pull --rebase upstream master
  4. Switch to master branch and rebase => git pull --rebase upstream master
  5. Push updated changes up to github origin-master => git push origin master
  6. Move Back to feature-branch => git checkout feature-branch
  7. That’s it!
const { RtmClient, MemoryDataStore, RTM_EVENTS } = require('@slack/client');
const token = process.env.SLACK_TOKEN || '';
const rtm = new RtmClient(token, {
logLevel: 'error',
// logLevel: 'debug',
// Initialise a data store for our client, this will load additional helper functions for the storing and retrieval of data
dataStore: new MemoryDataStore(),
// Boolean indicating whether Slack should automatically reconnect after an error response
autoReconnect: true,
const Tower = function(n) {
this.top = -1; // push will add one to top
this.stack = [];
for (let i = n; i > 0; i--) {
this.stack.push(i);
}
}
// push
<html>
<head></head>
<body>
<ul id="todo-app">
<li class="todo"><span>Walk the dog</span></li>
<li class="todo"><span>Pay bills</span></li>
<li class="todo"><span>Make dinner</span></li>
<li class="todo"><span>Code for one hour</span></li>