NOTE -
- Remove -h option if you are doing operation on same machine
- Remove -u , -p option if your database don't have username and password
Import database
mongorestore -h IP:port -d DB_Name -u user_name -p password <input db directory>
sudo yum install libmpc-devel mpfr-devel gmp-devel | |
cd ~/Downloads | |
curl ftp://ftp.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-4.9.2/gcc-4.9.2.tar.bz2 -O | |
tar xvfj gcc-4.9.2.tar.bz2 | |
cd gcc-4.9.2 | |
./configure --disable-multilib --enable-languages=c,c++ | |
make -j 4 | |
make install |
DKIM is DomainKeys Identified Mail and is used in mail servers, such as Postfix or Sendmail to sign e-mails and thus authenticating the sender so that a forgery can be detected. It also reduces the possibility of an e-mail being flagged as spam, but it's not a definite prevention. | |
A much simpler method is using SPF (Sender Policy Framework) which, in a nutshell, verifies the sender IP address. | |
According to the internet, using both should result to ????, PROFIT !!!. | |
SPF does not need a specific configuration. Whitelisted servers are listed in a DNS record, TXT or SPF, and an example record is: | |
example.com. IN TXT "v=spf1 a mx ~all" |
# Resetting your Windows Subsystem for Linux (WSL) Environment | |
lxrun.exe /uninstall /full | |
lxrun.exe /install |
// Restify Server CheatSheet. | |
// More about the API: http://mcavage.me/node-restify/#server-api | |
// Install restify with npm install restify | |
// 1.1. Creating a Server. | |
// http://mcavage.me/node-restify/#Creating-a-Server | |
var restify = require('restify'); |
var fn = function(arg1, arg2) { | |
var str = '<p>aap ' + this.noot + ' ' + arg1 + ' ' + arg2 + '</p>'; | |
document.body.innerHTML += str; | |
}; | |
var context = { | |
'noot': 'noot' | |
}; | |
var args = ['mies', 'wim']; | |
// Calls a function with a given 'this' value and arguments provided individually. |
#Use this URL to get your client authorized for Instafeed.JS plugin for Instagram.
#List of countries
It's time someone compiled a list of countries to use within a web application. This gist attempts to make a first move at that.
I've also compiled a list of nationalities
/** | |
* A simple example of how to use Waterline v0.10 with Express | |
*/ | |
var express = require('express'), | |
_ = require('lodash'), | |
app = express(), | |
Waterline = require('waterline'); |
var truth = function() { return true; }; | |
var relativeTruth = function() { return false; }; | |
var assert = function(func) { | |
return func() == true; | |
}; | |
var wrapper = function(func) { | |
// perform setup work here |