Here's how you could create custom error classes in Node.js using latest ES6 / ES2015 syntax.
I've tried to make it as lean and unobtrusive as possible.
errors/AppError.js
as found on StackOverflow
And this command to restart my php-fpm:
brew services restart php56
Sometimes you may want to undo a whole commit with all changes. Instead of going through all the changes manually, you can simply tell git to revert a commit, which does not even have to be the last one. Reverting a commit means to create a new commit that undoes all changes that were made in the bad commit. Just like above, the bad commit remains there, but it no longer affects the the current master and any future commits on top of it.
git revert {commit_id}
Deleting the last commit is the easiest case. Let's say we have a remote origin with branch master that currently points to commit dd61ab32. We want to remove the top commit. Translated to git terminology, we want to force the master branch of the origin remote repository to the parent of dd61ab32:
Sites which may involve the transmission of very sensitive data, such as health or banking information, are marked with an ❗ to signal they should deploy HTTPS-by-default as soon as possible. If you are a popular website (such as those on the Alexa Top 500 Global Sites) which finds itself on this list - and you want to be removed - you can visit Let's Encrypt about transitioning to HTTPS. It's easy, free, and will help you learn how to protect your customers/ readers!
List now outdated, removed until further notice.
Q: What is HTTPS?
'use strict'; | |
var AWS = require('aws-sdk'); | |
var S3 = new AWS.S3(); | |
var readline = require('readline'); | |
exports.handler = function (event, context) { | |
//Get S3 file bucket and name | |
//Make sure to loop through event.Records, don't assume there is only 1 in production!!! | |
var bucket = event.Records[0].s3.bucket.name; | |
var key = event.Records[0].s3.object.key; |
## How to hide API keys from github ## | |
1. If you have already pushed commits with sensitive data, follow this guide to remove the sensitive info while | |
retaining your commits: https://help.github.com/articles/remove-sensitive-data/ | |
2. In the terminal, create a config.js file and open it up: | |
touch config.js | |
atom config.js |
flex-flow:column-reverse wrap-reverse; | |
justify-content:center; | |
align-content:space-between; |
-- Table information like sortkeys, unsorted percentage | |
-- see http://docs.aws.amazon.com/redshift/latest/dg/r_SVV_TABLE_INFO.html | |
SELECT * FROM svv_table_info; | |
-- Table sizes in GB | |
SELECT t.name, COUNT(tbl) / 1000.0 AS gb | |
FROM ( | |
SELECT DISTINCT datname, id, name | |
FROM stv_tbl_perm | |
JOIN pg_database ON pg_database.oid = db_id |
This example shows how to use the d3.hexbin plugin for hexagonal binning on GoogleMaps. It is an update of Mike Bostock's Google Maps + D3 block.
<!doctype html> | |
<html> | |
<head> | |
<title>SSH Client</title> | |
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/socket.io/1.3.5/socket.io.min.js"></script> | |
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script> | |
<style> | |
body { | |
margin: 0; | |
padding: 0; |