Skip to content

Instantly share code, notes, and snippets.

View philkeys's full-sized avatar

Phil Keys philkeys

View GitHub Profile
@philkeys
philkeys / process-forms-express.js
Created July 29, 2015 02:36
WebDev with Node and Express => Processing forms using Express and Node
// basic form processing
// body-parser middleware must be linked in!
app.post('/process-contact', function (req, res) {
console.log('Received contact from ' + req.body.name + ' <' + req.body.email + '>');
// save to the database
// redirect to a thank you view and send the correct status code
res.redirect(303, '/thank-you');
});
// more reobust processing
@philkeys
philkeys / rendering.js
Last active August 29, 2015 14:26
WebDev with Node and Express => Rendering content with Express
// basic usage
app.get('/about', function (req, res) {
res.render('about');
});
// response codes other than 200
app.get('/error', function (req, res) {
res.status(500);
res.render('error');
});
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
@philkeys
philkeys / SassMeister-input-HTML.html
Created November 19, 2014 05:19
Generated by SassMeister.com.
<div class="block"></div>
@philkeys
philkeys / SassMeister-input-HTML.html
Created October 25, 2014 02:45
Generated by SassMeister.com.
<!-- <h2>Standard</h2>
<div class="icr-main-info-glyphs">
<div class="media-content">
<h3>Media Content Header</h3>
<p>Media Content Body</p>
</div>
</div>
<h2>Standard - flipped</h2>
<div class="icr-main-info-glyphs-1">
@philkeys
philkeys / SassMeister-input-HTML.html
Created October 16, 2014 04:59
Generated by SassMeister.com.
<div class="thing"></div>
<h2>Standard</h2>
<div class="icr-main-info-glyphs">
<div class="media-content">
<h3>Media Content Header</h3>
<p>Media Content Body</p>
</div>
</div>
@philkeys
philkeys / SassMeister-input.scss
Created December 9, 2013 16:45
Generated by SassMeister.com.
// ----
// Sass (v3.3.0.rc.1)
// Compass (v0.13.alpha.10)
// ----
$modal-border-color: #ddd;
$modal-max-width: 650px;
$modal-mobile-header: #27aae2;
$modal-layer: 999; // Set high z-index to appear above all other content