Skip to content

Instantly share code, notes, and snippets.

@yamingd
yamingd / TSAppResponse.hh
Created October 26, 2014 02:37
iOS Protobuf Wrapper
//
// TSAppResponse.hh
// k12
//
// Created by Yaming on 10/25/14.
// Copyright (c) 2014 All rights reserved.
//
#import <Foundation/Foundation.h>
#import "TSProtocolBufferWrapper.hh"
@yamingd
yamingd / jetty.sh
Last active August 29, 2015 14:08
#!/bin/bash
### BEGIN INIT INFO
# Provides: jetty
# Required-Start: $local_fs $remote_fs $network $syslog $named
# Required-Stop: $local_fs $remote_fs $network $syslog $named
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# X-Interactive: true
# Short-Description: Start/stop jetty servlet container
### END INIT INFO
@yamingd
yamingd / cocopods
Created October 23, 2014 03:11
china firewall
http://code4app.com/article/cocoapods-install-usage
https://about.gitlab.com/downloads/
http://ju.outofmemory.cn/entry/91822
http://blog.csdn.net/jiedushi/article/details/8840666
@yamingd
yamingd / gist:4bf33c6ad9fe37d92df4
Last active August 29, 2015 14:07
Python build
http://toomuchdata.com/2014/02/16/how-to-install-python-on-centos/
http://virtualenvwrapper.readthedocs.org/en/latest/
#!/bin/bash
# Install Redis
echo 'Install Redis'
cd /tmp
mkdir redis && cd redis
wget http://redis.googlecode.com/files/redis-2.4.10.tar.gz
tar -zxf redis-2.4.10.tar.gz
cd redis-2.4.10
make && make install
@yamingd
yamingd / reviewboard.sh
Last active August 29, 2015 14:07
ReviewBoard install on CentOS 6.5
yum -y install gcc automake autoconf libtool make
yum -y install zlib zlib-devel
yum -y install openssl-devel
yum -y install memcached
yum -y install python-devel
yum -y install python-setuptools
yum -y install patch
easy_install mysql-python
yum -y install git-core
@yamingd
yamingd / gist:b6755742e817f68c40f6
Last active August 29, 2015 14:07
Linux common commands
iptables:
--------------------------------------------------------------------------------
/etc/init.d/iptables save
This will save all rules in /etc/sysconfig/iptables, then just enable the iptables service at start-up using:
/sbin/iptables-save > /etc/iptables.rules
/sbin/iptables-restore < /etc/iptables.rule
@yamingd
yamingd / GsonUtil.java
Created September 16, 2014 01:49
GsonUtil
import com.google.gson.*;
import java.lang.reflect.Type;
import java.util.Date;
/**
* Created by yaming_deng on 14-9-15.
*/
public class GsonUtil {
@yamingd
yamingd / gist:2ccb679f2a2ae3ff7e8a
Created September 4, 2014 08:50
Example sbt build file for multi-module project
import sbt._
import Keys._
import sbtassembly.Plugin._
import AssemblyKeys._
import sbt.Package.ManifestAttributes
import sbt.Logger
import com.typesafe.sbt.SbtAtmos.{Atmos, atmosSettings, AtmosKeys}
object HelloSbtBuild extends Build {