Skip to content

Instantly share code, notes, and snippets.

View gazeldx's full-sized avatar
🏠
唯精唯一

Lane Zhang gazeldx

🏠
唯精唯一
View GitHub Profile
@gazeldx
gazeldx / flatten.rb
Last active September 23, 2016 12:00
class SmallTool
def initialize
@result_array = []
end
def array_flatten(target_array)
target_array.each do |item|
if item.is_a?(Array)
array_flatten(item)
else
@gazeldx
gazeldx / the.sh
Created May 11, 2016 09:19
用rails5搭建一个纯API项目实例
$ gem install rails -v 5.0.0.rc1
$ rails new yourProject -d postgresql
@gazeldx
gazeldx / postgresql at _etc_init.d_postgresql
Last active May 10, 2016 07:34
Add this file to as cron jobs: */5 * * * * /opt/cron/pgdb_checkdown.sh >> /opt/cron/down.log 目的是在postgreSQL数据库的服务器重启的时候,自动启动PostgreSQL
#! /bin/sh
# put this postgresql at /etc/init.d/postgresql
# chkconfig: 2345 98 02
# description: PostgreSQL RDBMS
# This is an example of a start/stop script for SysV-style init, such
# as is used on Linux systems. You should edit some of the variables
# and maybe the 'echo' commands.
#
# Place this file at /etc/init.d/postgresql (or