This is an unofficial manual for the couchdb
Python module I wish I had had.
pip install couchdb
"use strict"; | |
/*use in config.xml <hook type="after_platform_add" src="../path/to/cordova-ios-disable-push.js"/>*/ | |
var fs = require("fs"); | |
var path = require("path"); | |
var COMMENT_KEY = /_comment$/; | |
function nonComments(obj) { | |
var newObj = {}; | |
Object.keys(obj).forEach(function(key) { | |
if (!COMMENT_KEY.test(key)) { |
1. Use openssl | |
openssl smime -in /path/to/your.mobileprovision -inform der -verify | |
2. Use security command | |
security cms -Di /path/to/your.mobileprovision |
This is an unofficial manual for the couchdb
Python module I wish I had had.
pip install couchdb
Sometimes you want to retrieve EC2 insntances' region information.
You can query that information through instance metadata(169.254.169.254).
$ curl --silent http://169.254.169.254/latest/dynamic/instance-identity/document
{
"privateIp" : "172.31.2.15",
"instanceId" : "i-12341ee8",
"billingProducts" : null,
"instanceType" : "t2.small",
# 1. Install nginx | |
brew install nginx | |
# 2. Generate self-signed key/crt | |
openssl req -x509 -nodes -days 365 -newkey rsa:1024 \ | |
-keyout /etc/ssl/private/myssl.key \ | |
-out /etc/ssl/certs/myssl.crt | |
# 3. Edit nginx config located at: /usr/local/etc/nginx/nginx.conf | |
server { |
brew install nginx
sudo cp /usr/local/Cellar/nginx/1.8.0/homebrew.mxcl.nginx.plist /Library/LaunchAgents
Replace /usr/local/etc/nginx/nginx.conf
with the nginx.conf
in this gist. I'm using port 5000 for my current project. Obviously, change server_name
as well, and probably the name of its access log.
sudo amazon-linux-extras install epel -y | |
sudo yum install stress -y | |
## running | |
sudo stress --cpu 8 --timeout 200 |
This gist assuming that you have apahce hadoop installed and running. | |
step to install and config pig: | |
>1. brew install pig | |
>2. export JAVA_HOME="$(/usr/libexec/java_home)" | |
>3. export PIG_CLASSPATH=/path/to/pig.jar, normally if you install pig via homebrew, the path should be like:/usr/local/Cellar/pig/0.13.0/pig-0.13.0-h1.jar | |
step 2 & 3 are mandatory for me, otherwise *pig* wont work. |
angular.module('myApp', ['ionic', 'myApp.services', 'myApp.controllers']) | |
.run(function(DB) { | |
DB.init(); | |
}); |