brew install mongodb
Set up launchctl to auto start mongod
$ ln -sfv /usr/local/opt/mongodb/*.plist ~/Library/LaunchAgents
/usr/local/opt/mongodb/
is a symlink to /usr/local/Cellar/mongodb/x.y.z
(e.g., 2.4.9
)
#!/bin/sh | |
version="2.6.3" | |
priority="20603" | |
sudo mkdir -p /var/redis /var/log/redis | |
curl -sL http://redis.googlecode.com/files/redis-${version}.tar.gz | tar zx | |
cd redis-${version}/ | |
make | |
sudo make PREFIX=/usr/local/redis/${version} install |
from fpdf import FPDF | |
import re | |
import os | |
""" | |
Generate many files based on a tuple of data for sample. | |
@gist https://gist.github.com/silasrm/ff4733ecfa6bf1c6782c3513b89f10c4 | |
@version 0.1 | |
""" |
# Add to nginx.conf http section | |
map $http_upgrade $connection_upgrade { | |
default upgrade; | |
'' close; | |
} |
At some point you’ll find yourself in a situation where you need edit a commit message. That commit might already be pushed or not, be the most recent or burried below 10 other commits, but fear not, git has your back 🙂.
git commit --amend
This will open your $EDITOR
and let you change the message. Continue with your usual git push origin master
.
I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.
These are the steps I went through to set up an SSL cert.
/** | |
* $.parseParams - parse query string paramaters into an object. | |
*/ | |
(function($) { | |
var re = /([^&=]+)=?([^&]*)/g; | |
var decodeRE = /\+/g; // Regex for replacing addition symbol with a space | |
var decode = function (str) {return decodeURIComponent( str.replace(decodeRE, " ") );}; | |
$.parseParams = function(query) { | |
var params = {}, e; | |
while ( e = re.exec(query) ) { |
<?php | |
public function buscaParceiro(Request $request){ | |
$string = $request->get('pesquisa'); | |
$parceiro = DB::table('usuario') | |
->join('pessoa', 'pessoa.filho_id', '=', 'usuario.id') | |
->where('usuario.filho_type', '=', "'CompraSerrana\Parceiro'") | |
->where('pessoa.nome', 'LIKE', "%$string%") | |
->get(); |
/* Blink for Webkit and others | |
(Chrome, Safari, Firefox, IE, ...) | |
*/ | |
@-webkit-keyframes blinker { | |
from {opacity: 1.0;} | |
to {opacity: 0.0;} | |
} | |
.blink{ | |
text-decoration: blink; |