Skip to content

Instantly share code, notes, and snippets.

View eonezhang's full-sized avatar

eonezhang eonezhang

  • hnair.com
  • ChengDu
View GitHub Profile
@millermedeiros
millermedeiros / build.xml
Created February 13, 2011 20:57
RequireJS optimizer Ant task
<?xml version="1.0" encoding="utf-8"?>
<project name="sample-require-js" default="" basedir=".">
<!-- properties -->
<property name="r.js" value="_build/rjs/r.js" />
<property name="closure.jar" value="_build/closure/compiler.jar" />
<property name="rhino.jar" value="_build/rhino/js.jar" />
<property name="js.build" value="_build/js.build.js" />
<property name="css.build" value="_build/css.build.js" />
@chrisdarroch
chrisdarroch / idea
Created October 17, 2013 03:40
Open a project in IntelliJ IDEA from your command line!
#!/bin/sh
# check for where the latest version of IDEA is installed
IDEA=`ls -1d /Applications/IntelliJ\ * | tail -n1`
wd=`pwd`
# were we given a directory?
if [ -d "$1" ]; then
# echo "checking for things in the working dir given"
wd=`ls -1d "$1" | head -n1`
@lielran
lielran / Maven - get Snapshot version from pom
Last active November 16, 2019 05:31
Jenkins get Maven Version and save it to properties file
echo "######Getting Dev Version From Pom##########" > /dev/null 2>&1
SNAPSHOT="-SNAPSHOT";
DEV_VERSION=$(mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dq -Dexpression=project.version | grep -v '\[');
export RELEASE_VERSION="$(echo $DEV_VERSION | sed "s@$SNAPSHOT@@").$BUILD_NUMBER";
@nicolov
nicolov / Cargo.toml
Last active December 30, 2020 12:20
Rust API with Mysql
[package]
name = "api_example"
version = "0.1.0"
authors = ["nicolov"]
[dependencies]
iron = "*"
router = "*"
mysql = "*"
r2d2 = "*"
@kana-ph
kana-ph / guide-amq_zk.md
Last active February 17, 2023 05:47
ActiveMQ on Zookeeper Setup Guide

Setup Diagram

Image grabbed from ElasticCloudApps.com

Ingredients

  • 3 Linux machines with Installed JDK 1.7+
    • Default setup is 3 Replicas
  • Apache ActiveMQ 5.13.4 (stable)
    • Extract to /opt/activemq/apache-activemq-5.13.4 (We call this ACTIVEMQ_HOME from now on)
  • Apache Zookeeper 3.4.8 (stable)
@littlecodersh
littlecodersh / main.py
Last active October 15, 2024 00:58
Main script behind itchat robot
#coding=utf8
import itchat
# tuling plugin can be get here:
# https://github.com/littlecodersh/EasierLife/tree/master/Plugins/Tuling
from tuling import get_response
@itchat.msg_register('Text')
def text_reply(msg):
if u'作者' in msg['Text'] or u'主人' in msg['Text']:
return u'你可以在这里了解他:https://github.com/littlecodersh'
@colin-nolan
colin-nolan / install-git-subrepo.sh
Last active February 13, 2018 04:04
Install Git Subrepo
apt-get update \
&& apt-get install -y --no-install-recommends \
less \
git
git clone --depth=1 --branch=0.3.1 https://github.com/ingydotnet/git-subrepo.git /tmp/git-subrepo \
&& cd /tmp/git-subrepo \
&& make install \
&& cd - \
&& rm -rf /tmp/git-subrepo