-
Install msmtp, a simple sendmail stand-in that sends mail via a relay host (which is what you want, in almost all cases):
brew install msmtp --with-macosx-keyring
The flag with-macosx-keyring will make msmtp use the MacOS keychain, which is a pretty secure way to keep your mail account password secure.
-
Configure it as described in this article. Don't use the manual installation method described there, Homebrew (which we used in step 1) is way more convenient.
-
Have mail use msmtp instead of sendmail by creating .mailrc with the following content (or adding it, it the file already exists):
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
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: redis-server | |
# Required-Start: $syslog | |
# Required-Stop: $syslog | |
# Should-Start: $local_fs | |
# Should-Stop: $local_fs | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: redis-server - Persistent key-value db |
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
/var/log/nginx_*.log { | |
daily | |
compress | |
delaycompress | |
rotate 2 | |
missingok | |
nocreate | |
sharedscripts | |
postrotate | |
test ! -f /var/run/nginx.pid || kill -USR1 `cat /var/run/nginx.pid` |
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
<?php | |
/** | |
* Input an object, returns a json-ized string of said object, pretty-printed | |
* | |
* @param mixed $obj The array or object to encode | |
* @return string JSON formatted output | |
*/ | |
function json_encode_pretty($obj, $indentation = 0) { | |
switch (gettype($obj)) { | |
case 'object': |
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
$('a#bookmark').click(function(e){ | |
e.preventDefault(); | |
var bookmarkURL = this.href; | |
var bookmarkTitle = this.title; | |
try { | |
if (window.sidebar) { // moz | |
window.sidebar.addPanel(bookmarkTitle, bookmarkURL, ""); | |
} else if (window.external || document.all) { // ie | |
window.external.AddFavorite(bookmarkURL, bookmarkTitle); | |
} else if (window.opera) { // duh |
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
/* search form div container */ | |
#searchform { | |
margin:20px; | |
} | |
/* Styling the search input field */ | |
#field { | |
float:left; | |
width:300px; | |
height:27px; |
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
$(function () { | |
"use strict"; | |
// for better performance - to avoid searching in DOM | |
var content = $('#content'); | |
var input = $('#input'); | |
var status = $('#status'); | |
// my color assigned by the server | |
var myColor = false; |
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
// Doing AES-256-CBC (salted) decryption with node.js. | |
// This code is based on http://php.net/manual/de/function.openssl-decrypt.php and works with PHP sqAES. | |
// | |
// Create your encrypted data with | |
// echo -n 'Hello world' | openssl aes-256-cbc -a -e | |
var crypto = require('crypto'); | |
var password = 'password'; | |
var edata = 'U2FsdGVkX18M7K+pELP06c4d5gz7kLM1CcqJBbubW/Q='; |
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
(function () { | |
'use strict'; | |
var cluster = require('cluster'), | |
http = require('http'), | |
os = require('os'), | |
/* | |
* ClusterServer object |
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
#!/bin/sh | |
# | |
# stunnel Start/Stop the stunnel daemons | |
# | |
# description: stunnel is a script that runs stunnel daemons | |
# version 1.00 | |
# | |
# chkconfig: 345 40 60 | |
# | |
# processname: stunnel |
OlderNewer