Skip to content

Instantly share code, notes, and snippets.

View Michaela-Davis's full-sized avatar

Michaela D. Davis Michaela-Davis

View GitHub Profile
@Michaela-Davis
Michaela-Davis / connectToFirebase
Last active April 7, 2017 16:21
Angular CLI Commands
begin CONNECT to FIREBASE:
`npm install angularfire2 firebase --save` (installs angularfire2 and firebase, --save => updates dependencies in the project's package.json)
* ADD to src/tsconfig.json
"types": [ "firebase" ]
* CREATE src/app/api-keys.ts (but my Firebase credentials)
export var masterFirebaseConfig = {
apiKey: "xxxx",
authDomain: "xxxx.firebaseapp.com",
@Michaela-Davis
Michaela-Davis / terminal
Created March 31, 2017 18:59
Terminal Colors and Breaks: from Improve your Terminal @ http://portlandcodeschool.github.io/jsi/2015/08/10/welcome/
In terminal
atom ~/.bash_profile
Add the following lines to that file:
export PS1="\[$(tput bold)\]\[$(tput setaf 5)\]\u\[$(tput sgr0)\]:\[$(tput bold)\]\[$(tput setaf 2)\]\h\[$(tput sgr0)\]:\[$(tput bold)\]\[$(tput setaf 4)\]\w\[$(tput sgr0)\]\n$ \[$(tput sgr0)\]"
export PATH="$HOME/bin:/usr/local/bin:/usr/local/sbin:$PATH"
export CLICOLOR=1
export LSCOLORS=ExFxCxDxBxegedabagacad
export PAGER="less"
@Michaela-Davis
Michaela-Davis / index.html
Created March 12, 2017 03:26
proper module pattern for node.js
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script type="text/javascript" src="js/pingpong.js"></script>
<script type="text/javascript" src="js/pingpong-interface.js"></script>
<title>Ping Pong</title>
</head>
<body>
<form id="ping-pong-form">
{
"require": {
"phpunit/phpunit": "4.5.*",
"silex/silex": "~1.1",
"twig/twig":"~1.0"
},
"scripts": {
"test": "phpunit tests"
}
}
pairs:
md: Michaela Davis
al: Ada Lovelace
email:
md: michaela.delight@gmail.com
al: adanator@me.com
@Michaela-Davis
Michaela-Davis / README.md
Created February 13, 2017 09:00
BDD Specifications Table

Specifications

Behavior Input Output
A year that is NOT a leap year "1993" “false"
A year that is divisible by 4 “2004" “true"
A year that is divisible by 100 “2004" “false"
A year that is divisible by 400 “2004" “true"
<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine On
#RewriteBase /path/to/app
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [QSA,L]
</IfModule>
@Michaela-Davis
Michaela-Davis / form
Last active January 22, 2017 06:04
Form with submit button and 1 input, requires bootstrap
<form>
<div class="form-group">
<label for="number">number</label>
<input id="number" class="form-control" type="text">
</div>
<!-- Submit button -->
<button type="submit" class="btn">Is it bigger than 10?</button>
</form>