Overview
MongoDB is a document database that provides high performance, high availability, and easy scalability.
- Document Database
syntax on | |
set ai | |
set number | |
set mouse+=a | |
set tabstop=2 | |
set shiftwidth=2 | |
set softtabstop=2 | |
set expandtab " use spaces instead of tabs. | |
set smarttab " let's tab key insert 'tab stops', and bksp deletes tabs. | |
set shiftround " tab / shifting moves to closest tabstop. |
ServerAliveInterval 60 | |
StrictHostKeyChecking no | |
Host awesome-dev | |
Hostname xx.xx.xxx.xx | |
User <username> | |
IdentityFile ~/.ssh/dev-serverkeyfile.pem | |
Host awesome-prod | |
Hostname xx.xx.xxx.xx | |
User <username> |
# APP redirects | |
if ($http_user_agent ~* "iphone|ipod|ipad|appletv") { | |
rewrite ^/adl/(.*)$ https://itunes.apple.com/us/app/apple-store/id375380948?mt=8¶ms=$1 redirect; | |
} | |
if ($http_user_agent ~* "android") { | |
rewrite ^/adl/(.*)$ https://play.google.com/store/apps/details?id=com.app.witpay¶ms=$1 redirect; | |
} | |
if ($http_user_agent ~* "Windows") { | |
rewrite ^/adl/(.*)$ https://example.com/$1 redirect; |
#! /etc/systemd/system/name.service | |
[Unit] | |
Description==describe you upstart service | |
# if mysql service is prerequisite | |
Requires=mysql.service | |
After=mysql.service | |
# if anyother service is prerequisite |
#!/bin/bash | |
target_branch="production" | |
working_tree="PATH_TO_DEPLOY" | |
while read oldrev newrev refname | |
do | |
branch=$(git rev-parse --symbolic --abbrev-ref $refname) | |
if [ -n "$branch" ] && [ "$target_branch" == "$branch" ]; then | |
# This number should be, at maximum, the number of CPU cores on your system. | |
# (since nginx doesn't benefit from more than one worker per CPU.) | |
worker_processes 8; | |
# Determines how many clients will be served by each worker process. | |
# (Max clients = worker_connections * worker_processes) | |
# "Max clients" is also limited by the number of socket connections available on the system (~64k) | |
# run ss -s and u'll see a timewait param | |
# The reason for TIMED_WAIT is to handle the case of packets arriving after the socket is closed. |
import { Meteor } from 'meteor/meteor'; | |
import { Accounts } from 'meteor/accounts-base'; | |
import { FilesCollection } from 'meteor/ostrio:files'; | |
import * as fs from 'fs'; | |
import multer from 'multer'; | |
export const Avatars = new FilesCollection({ | |
collectionName: 'avatars', | |
allowClientCode: false, | |
onBeforeUpload: function (file) { |
#Install Ubuntu Linux, nginx, MySQL, PHP 7.0 (LEMP) stack | |
#nginx | |
sudo apt-get update && sudo apt-get upgrade | |
sudo apt-get install nginx | |
sudo apt-get update | |
check localhost or server ip address | |
"welcome message by nginx" | |
To stop your web server, you can type: |
https://github.com/PHPOffice/PHPExcel | |
http://pear.php.net/package/Spreadsheet_Excel_Writer/ | |
https://github.com/iliaal/php_excel | |
http://code.google.com/p/php-excel/ | |
https://github.com/elidickinson/php-export-data |