Skip to content

Instantly share code, notes, and snippets.

View noodles-v6's full-sized avatar

noodles noodles-v6

View GitHub Profile
<html class="normal" type="channel" channelname="#bash"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta http-equiv="Content-Script-Type" content="text/javascript"><meta http-equiv="Content-Style-Type" content="text/css"><style>html {font-family:'Courier';font-size:9pt;background-color:white;color:black;word-wrap:break-word;margin:0;padding:3px 4px 10px 4px;}body {margin:0;padding:0}img {border:1px solid #aaa;vertical-align:top;}object {vertical-align:top;}hr {margin:0.5em 2em;}.line {margin:0 -4px; padding:0 4px 1px 4px; clear:both;}.line[alternate=even] {}.line[alternate=odd] {}.line[type=action] .sender:before {content: '• ';white-space: nowrap;}.inlineimage {margin: 10px 0 15px 40px;max-width: 200px;max-height: 150px;-webkit-box-shadow: 2px 2px 2px #888;}.avatar {display: inline;max-width: 24px;max-height: 24px;margin-right: 3px;vertical-align: middle;}.url { word-break: break-all; }.address { text-decoration: underline; word-break: break-all; }.highlight { color: #f0f; font-
@noodles-v6
noodles-v6 / svn_check_status.bat
Last active December 17, 2015 07:39
svn check status
@rem = '--*-Perl-*--
@echo off
perl -x -S %0 %*
goto endofperl
@rem -- BEGIN PERL -- ';
#!perl
my @ignore_list = qw/
#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
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
#!/usr/bin/env perl
use 5.010;
use open qw(:locale);
use strict;
use utf8;
use warnings qw(all);
use Mojo::UserAgent;
# FIFO queue
//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;
@noodles-v6
noodles-v6 / top.sh
Created August 18, 2013 12:48 — forked from sdslnmd/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}
#!/usr/bin/env perl
use 5.010;
use open qw(:locale);
use strict;
use utf8;
use warnings qw(all);
use Mojo::UserAgent;
# FIFO queue
@noodles-v6
noodles-v6 / JdbcType.java
Created April 12, 2016 07:37
Mybatis.JdbcType
/**
* 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
@noodles-v6
noodles-v6 / 1
Created September 28, 2012 16:08
Perl中文匹配
!/usr/bin/perl
use strict;
use warnings;
use utf8;
use open ":encoding(utf8)",":std";
open my $infh, "<:encoding(utf8)", "zh.dat" or die $!;
while (<$infh>) {