2014/12/09
CGI, FASTCGI, WSGI, FPM
Cache, mod_php, compiladores opcodes
HHVM (Instalando e configurando), Hack Lang
<?php | |
use DMS; | |
use Doctrine\ORM\EntityManagerInterface; | |
use Doctrine\Common\Annotations\AnnotationReader; | |
use Symfony\Component\Validator; | |
class makeConstraints { |
git filter-branch --commit-filter | |
' | |
if [ "$GIT_COMMITTER_NAME" = "cristopher" ]; | |
then | |
GIT_COMMITTER_NAME="cristopher-rodrigues"; | |
GIT_AUTHOR_NAME="cristopher-rodrigues"; | |
GIT_COMMITTER_EMAIL="cristopher.rodrigues993@gmail.com"; | |
GIT_AUTHOR_EMAIL="cristopher.rodrigues993@gmail.com"; | |
git commit-tree "$@"; | |
else |
var mongoose = require("mongoose"), | |
Schema = mongoose.Schema, | |
bcrypt = require("bcrypt"), | |
SALT_WORK_FACTOR = 10; | |
var UserSchema = new Schema({ | |
username: { type: String, required: true, index: { unique: true } }, | |
password: { type: String, required: true } | |
}); |
/* LET: scope vars */ | |
let foo = "bar"; | |
console.log(foo); | |
if(foo.includes("bar")){ | |
let inc = true; | |
} | |
console.log(inc); | |
/*CONST: constants vars */ | |
const PI = 3.14; |
//For a specified field | |
db.collectionname.createIndex( | |
{ "field_name": "text" }, | |
{ name: "TextIndex" } | |
) | |
//For All Fields | |
db.collectionname.createIndex( | |
{ "$**": "text" }, | |
{ name: "TextIndex" } |
if [[ "$OSTYPE" == "linux-gnu" ]]; then | |
printf "\e[97mlinux-gnu ☂\n"; | |
elif [[ "$OSTYPE" == "darwin"* ]]; then | |
printf "\e[97mdarwin \n"; | |
else | |
echo "☠ WTF? ☠; | |
fi |
sudo dscacheutil -flushcache;
sudo killall -HUP mDNSResponder;say flushed
Clear MDNS Cache
sudo discoveryutil mdnsflushcache