Skip to content

Instantly share code, notes, and snippets.

/**
* Load cookies from a file
*
* @param {String} file name of da file.
*
* @return {Array} of cookies.
*/
function loadCookies(file) {
"use strict";
var cookies = [];
@achiko
achiko / gist:10393459
Last active August 29, 2015 13:58 — forked from jgeurts/gist:5847108
Install Nginx on Ubuntu
# From: http://www.cyberciti.biz/tips/using-nginx-as-reverse-proxy.html
# and: http://www.cyberciti.biz/faq/howto-linux-unix-setup-nginx-ssl-proxy/
# and: http://nginx.org/en/docs/http/websocket.html
# Run the following commands as su
sudo -s
# Use the stable version of nginx
nginx=stable
# Add nginx repository source
add-apt-repository ppa:nginx/$nginx
GO
/****** Object: StoredProcedure [dbo].[sspKillOldTransactions] Script Date: 04/16/2014 20:01:56 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: A.
-- Create date: 201100621
-- Description: Kill Open Transactions
USE [Crym]
GO
/****** Object: StoredProcedure [dbo].[sspMissingIndexes] Script Date: 04/16/2014 20:05:49 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
var util = require('util');
var request = require("request");
var _ = require('underscore');
var fs = require('fs');
var async = require('async');
var mathjs = require('mathjs'), math = mathjs();
cd ~
sudo apt-get update
sudo apt-get install openjdk-7-jre-headless -y
### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch and replace wget link below
# NEW WAY / EASY WAY
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.1.0.deb
sudo dpkg -i elasticsearch-1.1.0.deb
@achiko
achiko / Ubuntu_Couchdb
Last active August 29, 2015 14:01
Install CouchDb 1.5.1 on Unbuntu 12.04.4
sudo apt-get update -y
sudo apt-get install g++ -y
sudo apt-get install erlang-base erlang-dev erlang-eunit erlang-nox -y
sudo apt-get install libmozjs185-dev libicu-dev libcurl4-gnutls-dev libtool -y
curl -O http://apache.mirrors.tds.net/couchdb/source/1.5.1/apache-couchdb-1.5.1.tar.gz
tar -zxvf apache-couchdb-1.5.1.tar.gz
cd apache-couchdb-1.5.1
@achiko
achiko / elasticsearch_ubuntu
Last active August 29, 2015 14:01
Elasticsearch Ubuntu 12.04.4 64 Bit
cd ~
sudo apt-get update
sudo apt-get install openjdk-7-jre-headless -y
### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch and replace wget link below
# NEW WAY / EASY WAY
wget wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.2.2.deb
sudo dpkg -i elasticsearch-1.2.2.deb
@achiko
achiko / nodejs_ubuntu
Last active August 29, 2015 14:01
Install Nodejs on ubuntu
http://askubuntu.com/questions/49390/how-do-i-install-the-latest-version-of-node-js
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs
@achiko
achiko / nginx_ubuntu
Last active August 29, 2015 14:01
Latest version nginx on ubuntu
https://www.digitalocean.com/community/articles/how-to-install-the-latest-version-of-nginx-on-ubuntu-12-10
//-- Install latest version Nginx On Ubuntu
sudo apt-get install python-software-properties
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:nginx/stable
sudo apt-get install software-properties-common
sudo apt-get update