Skip to content

Instantly share code, notes, and snippets.

View atuanpham's full-sized avatar
Drinking coffee

Tuan Pham atuanpham

Drinking coffee
View GitHub Profile
@atuanpham
atuanpham / change username
Created October 8, 2018 14:33
Change username in Ubuntu
groupadd <new_user_name>
usermod -d /home/<new_user_name> -m -g <new_user_name> -l <new_user_name> <old_user_name>
@atuanpham
atuanpham / conda_env.md
Last active August 27, 2018 10:33
Conda tutorial

Change to project directory

cd demo-env

Create a new environment

conda env create
@atuanpham
atuanpham / centering_equations
Last active May 19, 2018 05:41
Centering Equations
---
title: "centering equations"
output:
pdf_document: default
classoption: fleqn
header-includes:
- \setlength{\mathindent}{0pt}
- \setlength{\parindent}{0pt}
---
@atuanpham
atuanpham / config_network.md
Last active May 23, 2018 03:46
Initial Ubuntu Server (16.04)

/etc/network/interfaces

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
@atuanpham
atuanpham / rm_mysql.md
Created April 7, 2018 03:01 — forked from vitorbritto/rm_mysql.md
Remove MySQL completely from Mac OSX

Remove MySQL completely

  1. Open the Terminal

  2. Use mysqldump to backup your databases

  3. Check for MySQL processes with: ps -ax | grep mysql

  4. Stop and kill any MySQL processes

  5. Analyze MySQL on HomeBrew:

brew remove mysql

FC00: Raggles, Rageon, Ragore
FC01: Mara, Maradon, Maranasaur
FC02: Cinde, Voladile, Infernus
FC04: Lavabolt, Magmech, Vulcanic
FC05: Rex, Raxillius, Renosaur
FC06: Minya, Minyara, Maximar
FC07: Viking, Viktron, Viktorius
FC08: Feri, Fieri, Fiersun
FC09: Fea, Feanor, Feandroth
FC10: Cretis, Toxicus, Mordroth
@atuanpham
atuanpham / fix_curl_certificate_error.md
Created June 13, 2016 14:10
curl: (77) error setting certificate verify locations
curl: (77) error setting certificate verify locations:
  CAfile: /etc/pki/tls/certs/ca-bundle.crt
  CApath: none

How to fix? Put the following line into .bashrc:

export CURL_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt
@atuanpham
atuanpham / [MySQL] Reset root's password.md
Created June 8, 2016 06:31
Reset root's password when the password is expired.
  • Stop mysqld service

  • Add to /etc/my.cnf with the following option:

skip-grant-tables
  • Start mysql

  • Connect to the mysql server using mysql client:

@atuanpham
atuanpham / OALD8.txt
Last active August 29, 2015 14:26
Install Oxford Dictionary in Ubuntu 14.04 LTS 64 bit and address sound problem.
--- Install missing packages:
sudo apt-get install libgtk2.0-0:i386 libidn11:i386 libglu1-mesa:i386 libpangox-1.0-0:i386 libpangoxft-1.0-0:i386
--- Install OALD8:
linux32 setup.sh
--- Address sound problem:
cd ~/oald8/plugins
mv libflashplayer.so libflashplayer.so.old
mkdir flash9