Working with 2 separate repos to store your development and production code bases.
In your development repository directory:
Add a remote for the production repository:
git remote add production git@github.com:user/production.git
var http = require('http'); | |
var fs = require('fs'); | |
var url = require('url'); | |
var path = require('path'); | |
var app = http.createServer(function(request, response) { | |
var parsedURL = url.parse(request.url, true); | |
console.log(parsedURL); | |
fs.readFile(path.join('.', parsedURL.pathname), 'utf8', function(err, contents) { | |
if (err) { |
// GET with callbacks | |
function get(url, success, error) { | |
var ajax = new XMLHttpRequest(); | |
ajax.onreadystatechange = function() { | |
if (this.readyState === 4) { | |
if (this.status === 200) { | |
var result = JSON.parse(this.responseText); | |
success(result); |
When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.
Please note we have a code of conduct, please follow it in all your interactions with the project.
# ${BIYellow}Usage:${Color_Off} Exactly like this! ${Green}Adding${Color_off} some ${UPurple}colors${Color_Off} to your | |
# command line prompts has never been easier! | |
# Reset | |
Color_Off=$'\033[0m' # Text Reset | |
# Regular Colors | |
export Black=$'\033[0;30m' # Black | |
export Red=$'\033[0;31m' # Red | |
export Green=$'\033[0;32m' # Green |
############################################################### | |
Please see "PS1 upgrades, with COLORS!" gist for color variables. | |
https://gist.github.com/connoro7/8c37fb4fb6abd6bca0c5cc13259e30c7 | |
############################################################### | |
## Git | |
## add | |
alias ga='git add' | |
alias gaa='git add -A && git status' | |
## branch |
# Usage: Command line user-error reduction and fail-safe utility | |
function confirm() | |
{ | |
# alert the user what they are about to do. | |
# echo "About to $@...."; | |
# confirm with the user | |
read -r -n 1 -p "$Yellow>Are you sure? [y/N]: $Color_Off" response | |
case "$response" in |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>Document</title> | |
<link rel="stylesheet" href="full-width-bleed-style.css" /> | |
</head> | |
<body> |
/* Converts rem units from base-16 to base 10. */ | |
/* No more 76.5px / 16 = 4.78rem, or 25px / 16 = 1.56rem, or 2.2rem * 16 = 35.2px */ | |
/* 2.5rem becomes 25px */ | |
/* 7.65rem becomes 76.5px */ | |
:root { | |
/* Adjusts rem to base-10 equivalent */ | |
font-size: 62.5%; | |
} |