Skip to content

Instantly share code, notes, and snippets.

@achiko
achiko / Git Heroku
Created July 1, 2013 12:08
Heroku SSH Guide
https://devcenter.heroku.com/articles/keys
Uploading SSH keys:
http://stackoverflow.com/questions/5136744/unable-to-push-master-to-heroku
type in gem install heroku
Then upload rsa key of github to heroku
$ heroku keys:add
@achiko
achiko / gist:5994343
Created July 14, 2013 13:49
Heroku mongolab connect
// http://stackoverflow.com/questions/10406668/how-do-i-use-node-mongodb-native-to-connect-to-heroku
// You connect to your mongolab database (so you can't create a new "blog" database). process.env.MONGOLAB_URI includes the // database name as well. See your mongolab uri:
heroku config | grep MONGOLAB_URI
It looks like: mongodb://heroku_app123456:password@dbh73.mongolab.com:27737/heroku_app123456
@achiko
achiko / es.sh
Created September 30, 2013 19:26
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-0.90.5.deb
sudo dpkg -i elasticsearch-0.90.5.deb
var myStore;
subjectStore.on('load', function() {
//--- Do Something
}, myStore, { single: true } );
/**
* 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:9570304
Created March 15, 2014 16:51
How To Install CouchDB from Source on a CentOS 6 x64 VPS
1 Heloo :)
2 yum update
3 reboot
4 yum localinstall http://epel.mirror.srv.co.ge/6/i386/epel-release-6-8.noarch.rpm
5 uname -rs
6 yum localinstall http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
7 yum update
8 yum install gcc
9 yum install make
@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();