Skip to content

Instantly share code, notes, and snippets.

View oktavianidewi's full-sized avatar
🏠
Working from home

Dewi Oktaviani oktavianidewi

🏠
Working from home
View GitHub Profile
@oktavianidewi
oktavianidewi / tutorial-python-package.md
Created May 7, 2018 07:34
step by step membuat simple python package

Tutorial untuk bikin simple python package dilihat disini. Short-term target: bisa bikin simple package. Long-term target: thesis dibikin versi package seperti ini, jadi mudah untuk diimplementasikan fungsi-fungsinya.

@oktavianidewi
oktavianidewi / crud-knex-nodejs-ts.md
Created May 7, 2018 07:03
tutorial membuat api untuk crud dengan knex, nodejs, ts, di-deploy ke docker
@oktavianidewi
oktavianidewi / dockerize-simple-api.md
Last active September 12, 2019 21:09
Dockerize simple API from Node-JS

Dockerize NodeJS

a note on how to dockerize NodeJS tutorial source from this link

Write Dockerfile and Build Docker Locally

The docker container is launched based on a docker image, the docker image is created with instructions written in the Dockerfile. So we have to add Dockerfile to the directory in the application directory.

write these set of commands on your Dockerfile

FROM node:7
@oktavianidewi
oktavianidewi / docker-installation.md
Last active May 6, 2018 04:48
a guide to docker-installation
@oktavianidewi
oktavianidewi / npm-ts-first-init.md
Last active March 26, 2018 03:03
npm and typescript first init

To write project which used npm and typescript, at the very first, we need to make npm and typescript initialization to the folder.

To initialize npm project

npm init
// You'll be asked about the project basic information which is stored in a generated file named package.json 

To initialize typescript

@oktavianidewi
oktavianidewi / set-up-academic-writing-environment.md
Last active March 25, 2018 10:58
set up latex, jupyter, git, maybe docker also

I want to set up and integrate latex, jupyter, git, mendeley and docker (in the next iteration) to support academic writing environment. It is basically inspired from this https://sylvaindeville.net/2015/07/17/writing-academic-papers-in-plain-text-with-markdown-and-jupyter-notebook/.

I have not installed Docker and managed mendeley yet in my Macbook Pro laptop, later I will install and write the documentation about it.

Now, I am going to write the steps on how to integrate latex, jupyter and github using local server (without docker). Overall, it is pretty easy. It is just beyond my overthinking!! Hahaha.

Integrate Jupyter and Github (through local server, still Dockerless)

Run Jupyter Notebook on Local

@oktavianidewi
oktavianidewi / world-phone-format.md
Created March 23, 2018 02:08
world-phone-format

UK phone numbers should contain 11 digits and are normally in the format (01234) 123123

US phone numbers These formats include 1234567890, 123-456-7890, 123.456.7890, 123 456 7890, (123) 456 7890, and all related combinations. If the phone number is valid, you want to convert it to your standard format, (123) 456-7890, so that your phone number records are consistent.

@oktavianidewi
oktavianidewi / latex-mac.md
Last active March 24, 2018 04:45
Install latex on mac

This is the step on how I start using latex on mac. Do we need to download certain apps to use latex? Basically, no. We can use our text editor, such as: atom, visual studio code, sublime, etc. However, if you are not familiar with text editors, you can also use an application named texWorks to write and compile any .tex files. Download the texWorks here: https://www.tug.org/texworks/ and install it.

Then, follow the tutorial written here. http://www.docs.is.ed.ac.uk/skills/documents/3722/3722-2014.pdf

If you are using visual studio code, you can download the extension support (?) found on the marketplace for latex.

Either you are using texWorks or any other text editor, you should install mactex (where pdflatex is included also) to be able to preview the latex document in pdf.

@oktavianidewi
oktavianidewi / managing-multiple-ssh-keys.md
Last active March 12, 2018 05:09
Managing Multiple SSH-keys

This is a note on how to create and manage multiple ssh-keys on laptop

$ ssh-add -l
$ ssh-add ~/.ssh/id_rsa
$ ssh-add ~/.ssh/id_rsa_personal

But, whenever I open new terminal tab and check for its ssh-agent through this command ssh-add -l, it returns no agent.

@oktavianidewi
oktavianidewi / random-notes.md
Last active March 2, 2018 04:18
random notes for python

When you run pip with sudo, you run setup.py with sudo. In other words, you run arbitrary Python code from the Internet as root. If someone puts up a malicious project on PyPI and you install it, you give an attacker root access to your machine. Prior to some recent fixes to pip and PyPI, an attacker could also run a man in the middle attack to inject their code when you download a trustworthy project. Instead of sudo pip install ApplicationName do pip install --user ApplicationName