Skip to content

Instantly share code, notes, and snippets.

View RavenZZ's full-sized avatar
🎯
Focusing

Raven RavenZZ

🎯
Focusing
View GitHub Profile
@RavenZZ
RavenZZ / BrewBindInstallAndSetupMacOSX10_10.sh
Created March 16, 2017 07:34 — forked from mpaskalev/BrewBindInstallAndSetupMacOSX10_10.sh
Install and setup bind (named) on Mac OS X 10.10.1 with brew 0.9.5
#!/bin/bash
# Run as root or sudo the commands that need it as you go.
# brew version 0.9.5
# Mac OS X 10.10.1
# A little bit changed version of this:
# http://stackoverflow.com/questions/19538118/osx-mavericks-bind-no-longer-installed-how-to-get-local-dns-server-working
@RavenZZ
RavenZZ / check_redis.py
Created February 17, 2017 08:30 — forked from samuel/check_redis.py
Redis health and memory check for Nagios
#!/usr/bin/python
#
# LICENSE: MIT
#
# Copyright (C) 2014 Samuel Stauffer
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation
@RavenZZ
RavenZZ / install golang on ubuntu.md
Created November 14, 2016 14:44
install golang on ubuntu

How to Install Go 1.6 on Ubuntu 16.04

link

Prerequisites

This tutorial assumes that you have access to an Ubuntu 16.04 system, configured with a non-root user with sudo privileges as described in Initial Server Setup with Ubuntu 16.04.

Step 1 — Installing Go

@RavenZZ
RavenZZ / combine.lua
Last active February 4, 2022 07:30
combine two request by openresty
cjson = require "cjson"
ngx. req. read_body() -- explicitly read the req body
local data = ngx. req. get_body_data()
local jsonBody = cjson. decode(data);
if data then
local reqs = { }
--ngx. say("body data:")
for key, value in pairs(jsonBody) do
--ngx.print(key)
@RavenZZ
RavenZZ / scala-ubuntu.md
Last active November 15, 2016 02:04
Ubuntu Scala

Ubuntu14.04下Scala开发环境搭建。

  1. 安装JDK,jdk-6u45-linux-x64.bin 将其安装到/usr/lib/jvm/jdk1.6.0_45/。
  2. 安装Scala,下载scala-2.11.4.tgz 将其解压到/usr/lib/jvm/scala-2.11.4/。
  3. 配置环境变量:
   vim /etc/profile
 
@RavenZZ
RavenZZ / install nodejs on centos.md
Last active November 15, 2016 02:04
How To Install And Run A Node.js App On Centos 6.4 64bit

Introduction

This article outlines the steps necessary to run a "Hello world" in node.js + express, running on a 64bit Centos 6.4 installation. We will be building the latest version of source (at this moment, v0.10.4) from the upstream provider.

As is written on their homepage, Node.js is a platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications. This is a fast, event driven platform and server-side Javascript engine used for building web applications. DigitalOceans' droplets are a cost-effective way to install and start studying server-side Javascript and bulding or deploying web applications with Node.js.

Setup a VPS

@RavenZZ
RavenZZ / install spark.sh
Last active November 15, 2016 02:05
install spark
# https://www.tutorialspoint.com/apache_spark/apache_spark_installation.htm
#dowload file
sudo wget http://d3kbcqa49mib13.cloudfront.net/spark-2.0.0-bin-hadoop2.7.tgz
#move file to local
sudo tar xvf spark-2.0.0-bin-hadoop2.7.tgz
sudo mv spark-2.0.0-bin-hadoop2.7 /usr/local/spark
@RavenZZ
RavenZZ / clearSystemProfole.js
Last active November 15, 2016 02:05
Mongo system.profile
db.setProfilingLevel(0)
db.system.profile.drop()
@RavenZZ
RavenZZ / install scala.sh
Last active November 15, 2016 02:05
scala installation on centos
#http://backtobazics.com/scala/4-steps-to-setup-scala-on-centos/
#Step 1: Download Tarball OR RPM file of Scala 2.11.6 using below commands
cd /data
sudo wget http://downloads.typesafe.com/scala/2.12.0-M5/scala-2.12.0-M5.tgz
#Step 2: Installation
sudo cp /data/scala-2.12.0-M5.tgz /opt/
@RavenZZ
RavenZZ / save all npm packages allready installed.sh
Last active November 15, 2016 02:06
How to npm install --save all packages already installed
npm install `ls node_modules` --save
npm install `dir node_modules/` --save