Skip to content

Instantly share code, notes, and snippets.

View narutaro's full-sized avatar
:octocat:
On vacation

narutaro narutaro

:octocat:
On vacation
View GitHub Profile
@narutaro
narutaro / Screen shot on Windows7.md
Last active December 22, 2015 01:16
Screen shot on Windows7

#Windows 7

Desktop

Alt + PrtSc

Selected application

Windows + PrtSc

##Windows 10

@narutaro
narutaro / Date conversion.md
Last active January 4, 2016 23:37
Date conversion

#Hey

I know you always forget how to do date conversion. Look at this.

#UNIX time

# date +%s
1444168730
@narutaro
narutaro / Yet another docker notes.md
Last active January 23, 2016 00:58
Yet another docker notes

Launching a container

$ docker run -d -h api --name=api -v /api:/api -v /tmp:/tmp -p 8080:80 -it ubuntu
$ docker run -d -h neo4j --name=neo4j -v /home/inoue/neo4j:/neo4j -v /flows:/flows -p 8080:80 -p 7474:7474 -it ubuntu

Logging into a container

@narutaro
narutaro / Neo4j.md
Last active January 22, 2017 06:22
Neo4j

Setting up Neo4j

##Configuration ###Accessing the neo4j server from outside Uncomment the following line in conf/neo4j-server.properties

# Let the webserver only listen on the specified IP. Default is localhost (only
# accept local connections). Uncomment to allow any connection. Please see the
# security section in the neo4j manual before modifying this.
org.neo4j.server.webserver.address=0.0.0.0
@narutaro
narutaro / sed snipps.md5
Last active October 9, 2015 07:01
sed snipps
#Overwriting a file
```
sed -i "s/SN002/SN003/g"
```
@narutaro
narutaro / Welcome to Gistlog.md
Last active December 27, 2015 22:15
Welcome to Gistlog

#Welcome to Gistlog

##What is Gistlog? Gistlog makes your gist snippets readable like a blog. This page is the live sample of Gistlog. All the contents here come form your gist.

##Intallation This repositry consists of html, css and js so just clone this repogitry to any web server. I recommend to use github pages. Just push to your repositry as <your_name>.github.io

git clone https://github.com/narutaro/narutaro.github.io.git
@narutaro
narutaro / Detouch terminal for a running job.md
Last active October 29, 2015 05:59
Detouch terminal while running a job

#Situation You have a running job which is taking longer time than expected and you gotta hit a road now. However, you don't want to stop the job cause it run long already.

#Solution This is what you can do.

  1. Ctrl+Z and put the job back ground
  2. Check the job id with jobs
  3. disown the job
@narutaro
narutaro / How to delete a file starting with hyphen.md
Last active December 23, 2015 01:19
How to delete a file starting with hyphen

#How to delete a file starting with - or --

##NO.1 - NG

$ rm '--attack_metadata'
rm: unrecognized option '--attack_metadata'
Try 'rm ./--attack_metadata' to remove the file ‘--attack_metadata’.
Try 'rm --help' for more information.
@narutaro
narutaro / sar command.md
Created October 30, 2015 21:00
sar command

#Every second, 500 times

$ sar 1 500
Linux 3.19.0-25-generic (netflowc) 	10/30/2015 	_x86_64_	(16 CPU)

02:00:09 PM     CPU     %user     %nice   %system   %iowait    %steal     %idle
02:00:10 PM     all     20.25      0.00      6.00     23.25      0.00     50.50
02:00:11 PM     all     19.02      0.00      6.21     32.71      0.00     42.06
02:00:12 PM all 18.47 0.00 5.69 33.21 0.00 42.63
@narutaro
narutaro / nfsen install on ubuntu 14.04.md
Last active June 23, 2016 06:38
nfsen install on ubuntu 14.04

Settin up nfsen

Error

inoue@netflowc:~/nfsen-1.3.6p1$ ./install.pl 
Can't locate RRDs.pm in @INC (you may need to install the RRDs module) (@INC contains: ./libexec ./installer-items /etc/perl /usr/local/lib/perl/5.18.2 /usr/local/share/perl/5.18.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.18 /usr/share/perl/5.18 /usr/local/lib/site_perl .) at libexec/NfSenRRD.pm line 38.
BEGIN failed--compilation aborted at libexec/NfSenRRD.pm line 38.
Compilation failed in require at libexec/NfSen.pm line 43.
BEGIN failed--compilation aborted at libexec/NfSen.pm line 43.
Compilation failed in require at ./install.pl line 46.