Skip to content

Instantly share code, notes, and snippets.

noodles noodles-v6

Block or report user

Report or block noodles-v6

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View JdbcType.java
/**
* Copyright 2009-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
View kafka.md

Introduction to Kafka

Kafka acts as a kind of write-ahead log (WAL) that records messages to a persistent store (disk) and allows subscribers to read and apply these changes to their own stores in a system appropriate time-frame.

Terminology:

  • Producers send messages to brokers
  • Consumers read messages from brokers
  • Messages are sent to a topic
@noodles-v6
noodles-v6 / gist:8909420
Created Feb 10, 2014
喜欢你-Beyond(歌词的粤语拼音)
View gist:8909420
sei yu dai fong sa tou fong fen dei gai dou
细 雨 带 风 湿 透 黄 昏 的 街 道
mu hei yu sui suang an mou gu dei yang mang
抹 去 雨 水 双 眼 无 故 地 仰 望
mang hang gu dan dei mai deng
望 向 孤 单 的 晚 灯
si na sang gan dei gei yi
是 那 伤 感 的 记 忆
zai ci fan hei sen lei mou sou dei si ni
再 次 泛 起 心 里 无 数 的 思 念
View mojo-crawler.pl
#!/usr/bin/env perl
use 5.010;
use open qw(:locale);
use strict;
use utf8;
use warnings qw(all);
use Mojo::UserAgent;
# FIFO queue
View top.sh
#!/bin/bash
redEcho()
{
echo -e "\033[1;31m$@\033[0m"
}
pid=`pgrep java`
uuid=`date +%s`_${RANDOM}_$$
jstackFile=/tmp/${uuid}_${pid}
sudo -u tomcat jstack ${pid} > ${jstackFile}
View WsChatServlet.java
//This sample is how to use websocket of Tomcat.
package wsapp;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.CharBuffer;
import java.util.ArrayList;
import org.apache.catalina.websocket.MessageInbound;
import org.apache.catalina.websocket.StreamInbound;
import org.apache.catalina.websocket.WebSocketServlet;
View mojo-crawler.pl
#!/usr/bin/env perl
use 5.010;
use open qw(:locale);
use strict;
use utf8;
use warnings qw(all);
use Mojo::UserAgent;
# FIFO queue
View install-redis.sh
cd /usr/local
mkdir redis-latest-install
cd redis-latest-install
curl http://redis.googlecode.com/files/redis-2.6.13.tar.gz | tar xz --strip-components=1
#In order to install Redis binaries into /usr/local/bin just use:
#
# % make install
#
#You can use "make PREFIX=/some/other/directory install" if you wish to use a
View node-and-npm-in-30-seconds.sh
#echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
#. ~/.bashrc
#mkdir ~/local
#mkdir ~/node-latest-install
#cd ~/node-latest-install
#curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
#./configure --prefix=~/local
#make install # ok, fine, this step probably takes more than 30 seconds...
#curl https://npmjs.org/install.sh | sh
View svn_check_status.bat
@rem = '--*-Perl-*--
@echo off
perl -x -S %0 %*
goto endofperl
@rem -- BEGIN PERL -- ';
#!perl
my @ignore_list = qw/
You can’t perform that action at this time.