Skip to content

Instantly share code, notes, and snippets.

cd /opt/joola/node_modules/joola
pm2 startup ubuntu
pm2 stop 0
mongo cache --eval "db.dropDatabase()"
redis-cli flushall
service mongod stop
rm -rf /var/lib/mongodb/journal/*
service mongod start
service mongod stop
var qitem = {
"name": "Delete an Application [" + name + "]",
"status": "pending",
"steps": [
{
"name": "Step 1: Destroy VM [" + name + "]",
"recipe": "vm/gce_destroyinstance",
"allowFail": true,
"args": {
"datacenter": datacenter,
{
"name": "Step n: Send email",
"recipe": "notify/email",
"args":{
"email":"[email protected]",
"subject":"testing 123...",
"text": "this is a test email content"
}
}
{
"name": "Create an Application [cnc.joo.la]",
"status": "pending",
"steps": [
{
"name": "Step 1: Create VM [cnc.joo.la]",
"recipe": "vm/create",
"args": {
"id": "cnc-002",
"name": "cnc-002",
{
"name": "Create an Application [node-demo-or]",
"status": "pending",
"steps": [
{
"name": "Step 1: Create VM [node-demo-or]",
"recipe": "vm/gce_addinstance",
"args": {
"id": "node-demo-or",
"name": "node-demo-or",
[submodule "wiki"]
path = wiki
url = https://github.com/joola/joola.io.wiki.git
[submodule "build/cookbooks/nodejs"]
path = build/cookbooks/nodejs
url = https://github.com/mdxp/nodejs-cookbook.git
[submodule "build/cookbooks/apt"]
path = build/cookbooks/apt
url = https://github.com/opscode-cookbooks/apt.git
[submodule "build/cookbooks/build-essential"]
@itayw
itayw / anothermodule.js
Last active August 29, 2015 14:03
Answer to FB question
exports.i_do_something = function(options, callback) {
var result = 'Here we go.';
return callback(null, result);
};
@itayw
itayw / google-datastore-insert
Created June 2, 2014 07:38
joola.io stats insert into Google Datastore
{ insert:
[ { key:
{ path:
[ { kind: '_stats_usage',
name: 1401692725593 } ] },
properties:
{ timestamp:
{ dateTimeValue: Mon Jun 02 2014 10:05:25 GMT+0300 (IDT),
indexed: true },
node: { stringValue: '3evd0zo2z', indexed: true },
@itayw
itayw / HISTORY.md.js
Last active August 12, 2020 17:16
Generate HISTORY.md from GitHub Milestones and Tags
/**
Build HISTORY.md from your GitHub Tags and Milestones.
Note: Tag and Milestone name/title MUST MATCH!
**/
var
GitHubApi = require('github'),
async = require('async'),
fs = require('fs'),
googleapis
.discover('analytics', 'v3')
.execute(function(err, client) {
if (err) {
utils.applog('error', {from: "lib/fetch/analytics.js", value: err, reference: "getAnalytics", resource: user_id});
return;
}
// Array that contains all request
var requests_list = [
{metrics: "ga:visits,ga:newVisits,ga:percentNewVisits,ga:newVisits,ga:pageviews,ga:visitBounceRate,ga:pageviewsPerVisit,ga:avgTimeOnSite"},