Skip to content

Instantly share code, notes, and snippets.

View tungphan-agilityio's full-sized avatar
🎯
Focusing

Tung Phan tungphan-agilityio

🎯
Focusing
  • AgilityIO - Software Innovation Redefined
  • Da Nang
View GitHub Profile
@tungphan-agilityio
tungphan-agilityio / MyApp.kt
Created September 24, 2019 17:28 — forked from Johnyoat/MyApp.kt
Changing or setting one font for all text font in android in Kotlin
class MyApp : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
val typefaceUtil = TypefaceUtil()
typefaceUtil.overridefonts(this,"SERIF","fonts/roboto.ttf")
}
}
@tungphan-agilityio
tungphan-agilityio / LICENCE SUBLIME TEXT
Created February 13, 2019 02:26
Sublime Text 3 Serial key build is 3176
## Sublime Text 3 Serial key build is 3176
> * Added these lines into /etc/hosts
127.0.0.1 www.sublimetext.com
127.0.0.1 license.sublimehq.com
> * Used the license key
----- BEGIN LICENSE -----
docker build -t friendlyhello . # Create image using this directory's Dockerfile
docker run -p 4000:80 friendlyhello # Run "friendlyname" mapping port 4000 to 80
docker run -d -p 4000:80 friendlyhello # Same thing, but in detached mode
docker container ls # List all running containers
docker container ls -a # List all containers, even those not running
docker container stop <hash> # Gracefully stop the specified container
docker container kill <hash> # Force shutdown of the specified container
docker container rm <hash> # Remove specified container from this machine
docker container rm $(docker container ls -a -q) # Remove all containers
docker image ls -a # List all images on this machine
minikube start # Start Minikube Service
minikube start --cpus 4 --memory 8192 # Start Minikube Service with 4 cpus and 8192 of memory
minikube stop # Stop Mikikube Service
minikube delete # Clean the configurations and start clean (maybe also you need rm -rf ./minikube)
minikube get-k8s-versions # List of Kubernetes versions Minikube currently supports
minikube start --kubernetes-version v1.7.5 # Start with a specific version of k8s
minikube ip # View ip of Cluster
minikube dashboard # Open the Dashboard
minikube dashboard --url # Get the Dashboard URL
minikube service --url SERVICE # Get the URL of service
@tungphan-agilityio
tungphan-agilityio / list.log
Created October 18, 2018 03:39 — forked from mohammadobaid1/list.log
List of most past CryptoCurrency ICO whitepapers PDF (from January 16th 2018), probably incomplete
https://www.gatcoin.io/wp-content/uploads/2017/08/GATCOIN-Whitepaper_ENG-1.pdf
https://appcoins.io/pdf/appcoins_whitepaper.pdf
https://pareto.network/download/Pareto-Technical-White-Paper.pdf
http://betbox.ai/BetBoxBizWhitepaper.pdf
https://www.aidcoin.co/assets/documents/whitepaper.pdf
https://irp-cdn.multiscreensite.com/ee070c4a/files/uploaded/Whitepaper%20AlchemyByte%20%26%20SLHashByte%20v1.6.pdf
http://goldminecoin.io/wp-content/uploads/2017/11/GoldMineCoin_ENG.pdf
https://www.pecun.io/wp-content/uploads/2017/10/Pecunio_White_Paper_011.pdf
http://ico.cryptoibet.com/assets1/pdf/whitepaper-1.pdf
https://www.bitnettoken.org/documents/BNETWhitePaper.pdf
@tungphan-agilityio
tungphan-agilityio / CacheConfig
Created September 14, 2018 10:07 — forked from ugur93/CacheConfig
Example of Spring Redis Cache Configuration using Spring-Data-Redis Lettuce Driver
import com.lambdaworks.redis.resource.DefaultClientResources;
import com.lambdaworks.redis.resource.Delay;
import org.apache.commons.pool2.impl.GenericObjectPoolConfig;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cache.CacheManager;
import org.springframework.cache.annotation.CachingConfigurerSupport;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cache.interceptor.CacheErrorHandler;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@tungphan-agilityio
tungphan-agilityio / upgrade-osx-bash.sh
Created May 22, 2018 14:40 — forked from Rican7/upgrade-osx-bash.sh
Upgrade Bash on Mac OS X
#/usr/bin/env sh
#
# Requires homebrew (http://brew.sh/)
# Thanks http://clubmate.fi/upgrade-to-bash-4-in-mac-os-x/
brew update && brew install bash && sudo bash -c 'echo /usr/local/bin/bash >> /etc/shells' && chsh -s /usr/local/bin/bash
@tungphan-agilityio
tungphan-agilityio / Fix OpenSSL Padding Oracle vulnerability (CVE-2016-2107) - Ubuntu 14.04
Created February 27, 2018 10:14
Fix OpenSSL Padding Oracle vulnerability (CVE-2016-2107) - Ubuntu 14.04
# Based on http://fearby.com/article/update-openssl-on-a-digital-ocean-vm/
$ sudo apt-get update
$ sudo apt-get dist-upgrade
$ wget ftp://ftp.openssl.org/source/openssl-1.0.2j.tar.gz # Check the last version
$ tar -xvzf openssl-1.0.2h.tar.gz
$ cd openssl-1.0.2h
$ ./config --prefix=/usr/
$ make depend
@tungphan-agilityio
tungphan-agilityio / minikube-sierra.md
Created February 3, 2018 02:52 — forked from inadarei/minikube-sierra.md
Minikube Setup: Docker for Mac / Sierra

Prerequisite: latest Docker for Mac on MacOS Sierra

$ brew update
$ brew install --HEAD xhyve
$ brew install docker-machine-driver-xhyve
$ sudo chown root:wheel $(brew --prefix)/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve
$ sudo chmod u+s $(brew --prefix)/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve

$ curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.18.0/minikube-darwin-amd64 &amp;&amp; chmod +x minikube &amp;&amp; sudo mv minikube /usr/local/bin/
@tungphan-agilityio
tungphan-agilityio / rm_mysql.md
Created December 20, 2017 15:03 — 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