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 / sed snipps.md5
Last active October 9, 2015 07:01
sed snipps
#Overwriting a file
```
sed -i "s/SN002/SN003/g"
```
@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 / 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 / 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 / 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 / No password with sudoers.md
Last active October 5, 2015 23:12
No password with /etc/sudoers

#Sample:

superuser ALL=(ALL) NOPASSWD:ALL
@narutaro
narutaro / nfdump usage.md
Last active August 5, 2022 20:21
nfdump usage

#Using nfdump nfdump is a light-weight and simple netflow collector.

#Receive netflow

nfcapd -w -D -l /flows -p 2055

#Show basic stats

@narutaro
narutaro / git nutshell.md
Last active March 11, 2016 22:10
Git nutshell

Create a new branch

nac:gtip_docs inoue$ git branch
* master
nac:gtip_docs inoue$ git checkout -b goo
Switched to a new branch 'goo'
nac:gtip_docs inoue$ git branch
* goo
 master
@narutaro
narutaro / Nerdtree in docker container.md
Last active February 14, 2019 01:17
Nerdtree in docker container

Nerdtree in docker container

Symptom

  • In the tree view of nerdtree, you see ?~V? instead of arrow shape.

Possible reason

  1. vim is not installed but vi
  2. The locale setting is wrong

Solutions

@narutaro
narutaro / Matching_space_with_grep.md
Last active September 4, 2015 01:04
Matching space with grep

Matching space with grep

grep "^\s\s\s\s\"url\":\s\"http" */*/*/analysis/json/analysis.json