Skip to content

Instantly share code, notes, and snippets.

View filipenos's full-sized avatar

Filipe Peixoto filipenos

View GitHub Profile
@filipenos
filipenos / file
Last active August 2, 2017 03:50
Bash conditional
File conditions
-b filename - Block special file
-c filename - Special character file
-d directoryname - Check for directory Existence
-e filename - Check for file existence, regardless of type (node, directory, socket, etc.)
-f filename - Check for regular file existence not a directory
-G filename - Check if file exists and is owned by effective group ID
-G filename set-group-id - True if file exists and is set-group-id
-k filename - Sticky bit
-L filename - Symbolic link
FROM ubuntu:latest
RUN apt-get update --yes && \
apt-get install --yes npm nodejs nodejs-legacy \
golang default-jdk python mercurial git
RUN npm -g install codebox
RUN useradd codebox -d /home/codebox
VOLUME ["/home/codebox"]
EXPOSE 8000
@filipenos
filipenos / gotips
Created October 24, 2014 12:31
Go tips
gofmt -d -l -r "package.OldFunc -> package.NewFunc" #Dry run to replate old func to new func
gofmt -w -l -r "pakcage.OldFunc -> package.NewFunc" #Replace old func to new func
@filipenos
filipenos / vimtips
Last active January 27, 2017 13:12
My vim tips
# Modes
<ESC> "normal
v "visual
V "visual-line
<CTRL> + v "visual-block
i "insert
I "insert (insert in first pos) (0+i)
a "insert after
A "insert (insert in last pos) ($+a)
s "insert (remove actual char and insert mode)