This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" This must be first, because it changes other options as a side effect. | |
set nocompatible | |
execute pathogen#infect() | |
syntax enable | |
set background=light | |
let g:solarized_colorscheme=256 | |
colorscheme solarized |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head><title>Geocoding</title> | |
<meta name="viewport" content="width=device-width maximum-scale=1 initial-scale=1 user-scalable=no"> | |
<link rel="stylesheet" type="text/css" href="../../style.css"/> | |
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=true"></script> | |
</head> | |
<body> | |
<h2>Geocoding</h2> | |
<p id="progress">Checking position</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mongo 199.124.1.2:12128/dbname -u dbusername -p dbpassword | |
1 2 3 4 5 | |
Explanation for those who are struggling | |
1. you server static IP address | |
2. you exposed port no (any in one of the four user B when A->B) | |
3. your databasename this is what you enter while you run this command dokku mongo:create dbname | |
4 & 5. you will get this when running dokku mongo:info |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Navigation | |
### Switch panes | |
ctrl-w, then arrow | |
ctrl-F Move to next screen | |
## NERDTree | |
m: Access menu | |
ctrl-k b Open NERDTree | |
## Run Unix command |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Print header | |
func myFunc(w http.ResponseWriter, r *http.Request) { | |
for k, v := range r.Header { | |
log.Println("key:", k, "value:", v) | |
} | |
} | |
// A. Print type of variable | |
fmt.Printf("Type of x %T\n", x) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
) | |
type person struct { | |
fname string | |
lname string | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Data Preprocessing Template | |
# Importing the libraries | |
import numpy | |
import matplotlib.pyplot | |
import pandas | |
from sklearn.preprocessing import Imputer | |
from sklearn.preprocessing import LabelEncoder, OneHotEncoder, StandardScaler | |
from sklearn.cross_validation import train_test_split |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Postgres cheat sheet | |
Note on prompts: | |
$ The command is run from the unix shell | |
# The command is run from psql, logged in as the default user. | |
=> The command is run from psql, logged in as a specific user. | |
Make sure that psql will auto start | |
$ pg_ctl -D /usr/local/var/postgres start && brew services start postgresql |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Start mysql | |
$ mysql.server start | |
Login as root | |
$ mysql -u root -p | |
Show databases | |
mysql> SHOW DATABASES | |
Create database |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Installing | |
$ docker version | |
$ docker run hello-world // Runs the Hello World sample. Downloads from Dockerhub if it isn't available locally | |
$ docker ps -a // Prints out all available containers on local machine | |
$ docker ps // Prints out all running containers on local machine | |
## Searching and runing | |
$ docker search whalesay | grep docker // Searches docker hub and filters with grep | |
$ docker run docker/whalesay cowsay Hello |
OlderNewer