Skip to content

Instantly share code, notes, and snippets.

View nak3's full-sized avatar

Kenjiro Nakayama nak3

View GitHub Profile
@nak3
nak3 / date-dir.sh
Created September 8, 2012 01:50
create file as YYYY-MM-DD-`PWD`.txt
touch "`date +%F`-`basename $(pwd)`.txt"
#!/bin/sh
# file name
AllFileInOneFile="allfileinonefile.xxx"
test -e ${AllFileInOneFile} && rm ${AllFileInOneFile}
echo "--- file list ---" >> ${AllFileInOneFile}
find . -type f -name '*.cpp' -or -name '*.hpp' >> ${AllFileInOneFile}
echo "----------------" >> ${AllFileInOneFile}
import javax.management.MBeanServerConnection;
import javax.management.remote.JMXConnector;
import javax.management.remote.JMXConnectorFactory;
import javax.management.remote.JMXServiceURL;
import javax.management.MBeanServer;
import javax.management.ObjectName;
import java.util.Set;
import java.util.Iterator;
@nak3
nak3 / find
Created September 9, 2013 11:30
find . -type d -name "batch" -prune -or -type d -name "gui" -prune -or -type d -name "parsing" -prune -or -type d -name "util" -prune -or -type f
for filename in *.c ; do
mv $filename ${filename%.c}.cpp;
done
555 ;
556 ; Path style is defined in gtags-path-style:
557 ; root: relative from the root of the project (Default)
558 ; relative: relative from the current directory
559 ; absolute: absolute (relative from the system root directory)
560 ;
561 (cond
562 ((equal gtags-path-style 'absolute)
563 (setq option (concat option "a")))
564 ((equal gtags-path-style 'root)
@nak3
nak3 / mptcp_rpm_install.md
Last active October 26, 2021 08:58
mptcp kernel RPM package install instructions

Description

mptcp_kernel is the kernel package which built with mptcp (MultiPath TCP) function. The source code is hosted in github .

The RPM package is hosted on Fedora copr. It can be used on Fedora and CentOS (only x86_64) and their some versions..

####WARNING

This package is now still working in progress and being tested by Kenjiro Nakayama. Please don't use it in your production system. And this is not official repository and please take full responsibility for your actions.

git log --committer="COMMITER NAME" --name-only --oneline > commiter.log
grep -v '^[0-9a-zA-Z]\{7\}' commiter.log > commister-file.log
sort commiter-file.log | uniq > result.log
ip addr add 10.1.2.3/24 dev eth2
ip addr add 10.1.2.4/24 dev eth2
ip addr add 10.1.2.5/24 dev eth2
ip addr add 10.1.2.6/24 dev eth2
ip addr add 10.1.2.7/24 dev eth2
ip addr add 10.1.2.8/24 dev eth2
ip addr add 10.1.2.9/24 dev eth2
import java.util.regex.Pattern;
public class Matcher {
private static final Pattern SIMPLE_URL_PATTERN =
Pattern.compile("(\\w+://)|(git@)(.+@)*([\\w\\d\\.]+)(:[\\d]+){0,1}/*(.*)");
public static boolean isValid(String url) {
return SIMPLE_URL_PATTERN.matcher(url).matches();
}