Skip to content

Instantly share code, notes, and snippets.

View nak3's full-sized avatar

Kenjiro Nakayama nak3

View GitHub Profile
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 / httpclient.go
Last active December 18, 2015 10:28
Go http GET client test
package main
import (
"crypto/tls"
"fmt"
"net/http"
)
func get(url string, allowInsecure bool, proxyfromclientset bool) (*http.Response, error) {
client := http.DefaultClient
@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
@nak3
nak3 / test-rolling.json
Last active September 2, 2015 10:15
test-complete + rolling strategy example
{
"kind": "List",
"apiVersion": "v1",
"metadata": {
"name": "hello-service-complete-example"
},
"items": [
{
"kind": "Service",
"apiVersion": "v1",
apiVersion: v1
kind: Pod
metadata:
name: nginx
spec:
containers:
- name: nginx
image: nginx
resources:
limits:
{
"apiVersion": "v1",
"items": [
{
"apiVersion": "v1",
"kind": "ImageStream",
"metadata": {
"creationTimestamp": null,
"labels": {
"app": "python"
{
"apiVersion": "v1",
"items": [
{
"apiVersion": "v1",
"kind": "ImageStream",
"metadata": {
"creationTimestamp": null,
"labels": {
"app": "hello-c"
@nak3
nak3 / killer.yaml
Last active September 1, 2015 09:46
apiVersion: v1
items:
- apiVersion: v1
kind: BuildConfig
metadata:
creationTimestamp: null
labels:
app: hello-c
name: hello-c
spec: