Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">

GRIT

  • Stop! turn off the negative thinking
  • Take a deep breath
  • Find a micro goal
  • Positive Mental Attitude - (silly mantra is helpful)
  • Rinse and repeat!!!!!
@kurtzilla
kurtzilla / Bubble Sort Algo
Created August 17, 2016 21:35
A functional explanation of the bubble sort
// perform a search bigO(n^2)
function bubbleSort(arr) {
// loop through every array element: indices: 0 thru (last-1)
// note starting i at 1 - we need to be able to decrease the looping iterations and if
// we had used a zero index, the loop would not progress correctly
// this is because each iteration moves the highest value in the lopped through set
// to the last element. So on the next iteration, we can skip examining the last element
// 1. declare a new empty array, and pointers
// corresponding to indices in arr1 and arr2
// (set them both to 0)
// 2. if the first element in arr1 is less than the
// first element in arr2, push the first element in
// arr1 to the new array, and move the pointer for
// arr1 one spot to the right. Otherwise, do this for arr2.
// 3. Repeat this process until you've gone through
/*********DISCLAIMER***********/
/* there is more than one way to do a sort :) */
function swap(arr, idx1, idx2) {
var temp = arr[idx1];
arr[idx1] = arr[idx2];
arr[idx2] = temp;
}
////////////////////////////////////////////
// Discuss the basic function and purpose of promises
////////////////////////////////////////////
module.exports.recordWebhook = function(json_event){
return new Promise(function(resolve, reject){
return resolve('aok')
});
};
@kurtzilla
kurtzilla / gist:d9393676c3c51ebdba947072d4ab4cd4
Last active January 16, 2017 16:33
My steps to heroku deploy
fork master branch: git@github.com:ctrlplusb/react-universally.git
@commit 28769d1e11702c4c4acb3aa26650215a38986527
git clone git@github.com:[my-fork]/react-universally.git [my-repo]
cd [my-repo]
npm install
touch .slugignore
echo yarn.lock >> .slugignore
~/source/react2017/January/webpack-tuts/my-repo   master  git push heroku master
Counting objects: 3, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 287 bytes | 0 bytes/s, done.
Total 3 (delta 2), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Deleting 1 files matching .slugignore patterns.