Skip to content

Instantly share code, notes, and snippets.

View nak3's full-sized avatar

Kenjiro Nakayama nak3

View GitHub Profile
{
"apiVersion": "v1",
"items": [
{
"apiVersion": "v1",
"kind": "ImageStream",
"metadata": {
"creationTimestamp": null,
"labels": {
"app": "python"
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)
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();
}
deleteline1="%{?scl:%scl_prefix}build"
deleteline2="nodejs010-build"
deleteline3="ruby193-build"
find . -name "*.spec" -type f -print0 | xargs -0 sed -i -e /$deleteline1/d
find . -name "*.spec" -type f -print0 | xargs -0 sed -i -e /$deleteline2/d
find . -name "*.spec" -type f -print0 | xargs -0 sed -i -e /$deleteline3/d
@nak3
nak3 / boot.sh
Created January 2, 2015 02:37
build and qemu emulate from boot script
#!/bin/bash
dd if=/dev/zero of=floppy2.img bs=512 count=2880
as test2.S -o test2.o
ld -Ttext 0x7c00 --oformat=binary test2.o -o test2.bin
dd if=test2.bin of=floppy2.img
qemu-kvm -fda floppy2.img -boot a -no-fd-bootchk
@nak3
nak3 / memo.sh
Last active August 29, 2015 14:18 — forked from ponkore/memo.sh
# http://d.hatena.ne.jp/haru-s/20110405/1302006637 に答えがそのままあるが、一応メモ
# github fork 追従 で見つけた
$ git remote
origin
# 本家のリモートリポジトリの短縮名を登録する.
$ git remote add github git://github.com/liquidz/misaki.git
# 本家の更新をローカルで反映させる.
@nak3
nak3 / osev3-templates
Created July 16, 2015 07:11
OSEv3 all template view
# pwd
/usr/share/openshift/examples
# find db-templates xpaas-templates quickstart-templates -type f | gawk -F'[/.]' '{print $1 " \t " $2}'
db-templates mongodb-ephemeral-template
db-templates mongodb-persistent-template
db-templates mysql-ephemeral-template
db-templates mysql-persistent-template
db-templates postgresql-ephemeral-template
db-templates postgresql-persistent-template
xpaas-templates amq6-persistent