Skip to content

Instantly share code, notes, and snippets.

View teamsoo's full-sized avatar
💭
Into the Wild

Phakin Cheangkrachange teamsoo

💭
Into the Wild
View GitHub Profile
@teamsoo
teamsoo / mysql-docker.sh
Created December 16, 2019 10:58 — forked from spalladino/mysql-docker.sh
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
@teamsoo
teamsoo / README.md
Created March 10, 2018 02:44 — forked from hofmannsven/README.md
My simply Git Cheatsheet
@teamsoo
teamsoo / GoogleMapDownloader.py
Created February 12, 2018 07:41 — forked from sebastianleonte/GoogleMapDownloader.py
A python script to download high resolution Google map images given a longitude, latitude and zoom level. (Works with Python 3)
#!/usr/bin/python
# GoogleMapDownloader.py
# Created by Hayden Eskriett [http://eskriett.com]
#
# A script which when given a longitude, latitude and zoom level downloads a
# high resolution google map
# Find the associated blog post at: http://blog.eskriett.com/2013/07/19/downloading-google-maps/
import urllib.request
from PIL import Image
stun1.l.google.com:19302, stun2.l.google.com:19302, stun3.l.google.com:19302, stun4.l.google.com:19302, stun.stunprotocol.org:3478
@teamsoo
teamsoo / bash-cheatsheet.sh
Created April 30, 2017 14:26 — forked from LeCoupa/bash-cheatsheet.sh
Bash CheatSheet for UNIX Systems
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
@teamsoo
teamsoo / custom_jdk_ambari
Created April 3, 2017 09:59
Use custom JDK in Ambari
a. Use the 'Stop all' from the Actions button off the main Ambari dashboard to shut down all HDP components.
b. Using Clush/Pdsh/Cluster scripting tool of choice, confirm that ALL Java processes are fully stopped across ALL cluster nodes (excluding Ambari), killing any orphaned processes that Ambari was unable to stop.
c. Run the following from Ambari master node (as root) to stop the Ambari-agent and Ambari-server processes.
sudo ambari-agent stop
sudo ambari-server stop
d. Run the following from Ambari-server master node (as root):
ambari-server setup (and follow the prompts, example provided below)
@teamsoo
teamsoo / .myzshrc.sh
Last active June 9, 2017 02:49
myzshrc for zsh on my mac
#!/bin/zsh
# EDITOR
export EDITOR='vim'
# Owner
export USER_NAME="Bob"
eval "$(rbenv init -)"
# FileSearch