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" |
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
<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> |
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
<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> |
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
pairs: | |
md: Michaela Davis | |
al: Ada Lovelace | |
email: | |
md: [email protected] | |
al: [email protected] |
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
{ | |
"require": { | |
"phpunit/phpunit": "4.5.*", | |
"silex/silex": "~1.1", | |
"twig/twig":"~1.0" | |
}, | |
"scripts": { | |
"test": "phpunit tests" | |
} | |
} |
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
<!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"> |
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
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" |
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
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", |
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
class WeatherController | |
{ | |
public function api() { | |
$city = 'Missoula'; | |
$state = 'MT'; | |
$weather = 'http://api.wunderground.com/api/28eb4ab328f37f10/conditions/q/' . $state . '/' . $city . '.json'; | |
// $apiKey = '28eb4ab328f37f10'; | |
$result = file_get_contents($weather); | |
$weather_array = json_decode($result, true); |
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
'use strict'; | |
const https = require('https'); | |
const superagent = require('superagent'); | |
module.exports = { | |
index | |
} | |
function index(req, res, next) { |
OlderNewer