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
apiVersion: v1
kind: Service
metadata:
name: webapp1-svc
labels:
app: webapp1
spec:
type: NodePort
ports:
- port: 80
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: webapp1
spec:
replicas: 1
template:
metadata:
labels:
app: webapp1
@tungphan-agilityio
tungphan-agilityio / git-pull-all.sh
Created September 26, 2018 02:34
Git pull all branches
#!/usr/bin/env bash
git branch -r | grep -v '\->' | while read remote; do git branch --track "${remote#origin/}" "$remote"; done
git fetch --all
git pull --all
#!/usr/bin/env bash
docker run --name try-spring-boot-redis -p 6379:6379 -d redis
@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;