View substring.js
/** | |
* @param {string} s | |
* @return {number} | |
*/ | |
var lengthOfLongestSubstring = function(s) { | |
var max = 0; | |
var str = ''; | |
var i = 0; | |
var cache = []; | |
View Install_tmux
# First install tmux | |
brew install tmux | |
# For mouse support (for switching panes and windows) | |
# Only needed if you are using Terminal.app (iTerm has mouse support) | |
Install http://www.culater.net/software/SIMBL/SIMBL.php | |
Then install https://bitheap.org/mouseterm/ | |
# More on mouse support http://floriancrouzat.net/2010/07/run-tmux-with-mouse-support-in-mac-os-x-terminal-app/ |
View Hostel Data
{ | |
"type": "FeatureCollection", | |
"features": [ | |
{ | |
"type": "Feature", | |
"geometry": { | |
"type": "Point", | |
"coordinates": [ | |
-71.98215490000001, | |
-13.5178622 |
View gist:bfdde95eabfbe3769a521c8622712cc5
git reset --hard <old-commit-id> | |
git push -f |
View Express Quick Setup
===========INSTRUCTIONS FOR EXPRESS APP================ | |
npm init | |
-> Blank | |
-> Blank | |
-> Fill out Description | |
-> type app.js for entry point | |
-> Blank | |
-> Blank | |
-> License MIT | |
-> Enter for OK |
View Heroku with DB
In project: | |
1. Double check that package.json has a start script | |
In command line, in PROJECT folder - add Heroku: | |
2. which heroku | |
3. heroku create herokuSiteName | |
4. git remote -v (shows you the heroku remote) | |
In command line, in PROJECT folder - add DB to Heroku: | |
5. heroku addons:create heroku-postgresql |
View LICENSE
The MIT License (MIT) | |
Copyright (c) 2015 Justin Perry | |
Permission is hereby granted, free of charge, to any person obtaining a copy of | |
this software and associated documentation files (the "Software"), to deal in | |
the Software without restriction, including without limitation the rights to | |
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of | |
the Software, and to permit persons to whom the Software is furnished to do so, | |
subject to the following conditions: |
View inputfields
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
View index.html
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
NewerOlder