Skip to content

Instantly share code, notes, and snippets.

View vuquangchien's full-sized avatar

Vũ Quang Chiến vuquangchien

View GitHub Profile
import { digest } from 'json-hash';
import mongose from 'mongoose';
import passportLocalMongoose from 'passport-local-mongoose';
import { fetchAndCache } from '../cache/redis';
const ObjectId = mongose.Schema.ObjectId;
const AdminUser = new mongose.Schema({
username: {
type: String,
vuquangchien / gist:010e6724d5d3fa28ff8c
Created November 13, 2014 03:04
Install Java Oracle SDK
wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie"
rpm -Uvh jdk-7u67-linux-x64.rpm
alternatives --install /usr/bin/java java /usr/java/latest/jre/bin/java 200000
echo 'export JAVA_HOME="/usr/java/latest"' >> ~/.bash_profile
--set static ip
vuquangchien / gist:9360677
Last active August 29, 2015 13:57
Hortonworks installation guide

Run on all nodes

1/ Set static IP of the machine

vim /etc/sysconfig/network-scripts/ifcfg-eth0

#Change the following properties
vuquangchien / gist:8119830
Created December 25, 2013 02:58
BoxStarter script
Set-ExplorerOptions -showHidenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions
cinst fiddler4
cinst sublimetext2
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Linux version 3.2.037virtual (buildd@allspice) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.31ubuntu5) ) #58Ubuntu SMP Thu Jan 24 15:48:03 UTC 2013 (Ubuntu 3.2.35)
[ 0.000000] Command line: LABEL=cirrosrootfs ro console=tty1 console=ttyS0
[ 0.000000] KERNEL supported cpus:
[ 0.000000] Intel GenuineIntel
[ 0.000000] AMD AuthenticAMD
[ 0.000000] Centaur CentaurHauls
[ 0.000000] BIOSprovided physical RAM map:
[ 0.000000] BIOSe820: 0000000000000000 000000000009dc00 (usable)
# Show debugging output in log (sets DEBUG log level output)
# debug = true
# The DHCP agent will resync its state with Quantum to recover from any
# transient notification or rpc errors. The interval is number of
# seconds between attempts.
# resync_interval = 5
# The DHCP requires that an inteface driver be set. Choose the one that best
vuquangchien / gist:6419632
Created September 3, 2013 04:07
Askbot Apache config
#NOTE: the directory paths used here may be adjusted
#the following two directories must be both readable and writable by apache
#WSGIPythonEggs /var/python/eggs
#the following directory must be readable by apache
#WSGIPythonHome /usr/local
#NOTE: all urs below will need to be adjusted if
#settings.FORUM_SCRIPT_ALIAS is anything other than empty string (e.g. = 'forum/')