Skip to content

Instantly share code, notes, and snippets.

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

Fitra Nugraha Fitranugraha

🏠
Working from home
View GitHub Profile
@Fitranugraha
Fitranugraha / hello_world.go
Last active July 7, 2020 23:42
Python Hello World
package main
import (
"fmt"
)
func main() {
fmt.Println("Hello, playground")
}
sudo rm -Rf /Applications/Docker
sudo rm -f /usr/local/bin/docker
sudo rm -f /usr/local/bin/docker-machine
sudo rm -f /usr/local/bin/docker-compose
sudo rm -f /usr/local/bin/docker-credential-osxkeychain
sudo rm -Rf ~/.docker
sudo rm -Rf $HOME/Library/Containers/com.docker.docker # here we delete stored images
curl -L -O https://github.com/docker/toolbox/raw/master/osx/uninstall.sh; sudo bash uninstall.sh
@Fitranugraha
Fitranugraha / kotlin_syntax.txt
Last active April 7, 2020 23:45
Kotlin Syntax Should Remember
fun main(){
val allBooks = setOf("Macbeth", "Romeo and Juliet", "Hamlet", "A Midsummer Night's Dream")
val library = mapOf("Shakespeare" to allBooks)
println(library.any { it.value.contains("Hamlet") })
val moreBooks = mutableMapOf<String, String>("Wilhelm Tell" to "Schiller")
moreBooks.getOrPut("Jungle Book") { "Kipling" }
moreBooks.getOrPut("Hamlet") { "Shakespeare" }
@Fitranugraha
Fitranugraha / purgeAndroid.txt
Created March 26, 2020 15:10 — forked from tahmidsadik/purgeAndroid.txt
How to completely remove Android Studio from Mac OS X
How to Completely Remove Android Studio
Execute these commands from the terminal
rm -Rf /Applications/Android\ Studio.app
rm -Rf ~/Library/Preferences/AndroidStudio*
rm ~/Library/Preferences/com.google.android.studio.plist
rm -Rf ~/Library/Application\ Support/AndroidStudio*
rm -Rf ~/Library/Logs/AndroidStudio*
@Fitranugraha
Fitranugraha / odoo-server
Last active March 1, 2020 01:30
Odoo as Service
#!/bin/sh
### BEGIN INIT INFO
# Provides: odoo-server
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Should-Start: $network
# Should-Stop: $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Odoo ERP
@Fitranugraha
Fitranugraha / Ubuntu Service
Last active March 1, 2020 01:13
How to Start, Stop or Restart Services in Ubuntu
#List Services on Ubunut
service --status-all

Odoo - Rename an addon without losing data

Rename addon

  • Change __openerp__.py addon name field
  • Change README.rst file

Step 1 - Add the Odoo repository

wget -O - https://nightly.odoo.com/odoo.key | apt-key add -
echo "deb http://nightly.odoo.com/10.0/nightly/deb/ ./" >> /etc/apt/sources.list
apt-get update

Step 2 - Configure a Linux user for Odoo