Skip to content

Instantly share code, notes, and snippets.

Anh Tu Nguyen xgenvn

Block or report user

Report or block xgenvn

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@xgenvn
xgenvn / scale.md
Created Aug 13, 2019
Skill Competence Scale.md
View scale.md

Basic Knowledge

You have a common knowledge or an understanding of basic techniques and concepts.

  • Focus on learning.

Limited experience

You have the level of experience gained in a classroom and/or experimental scenarios or as a trainee on-the-job. You are expected to need help when performing this skill.

View gradle-cheatsheet.gradle
// imports a couple of java tasks
apply plugin: "java"
// List available tasks in the shell
> gradle tasks
// A Closure that configures the sourceSets Task
// Sets the main folder as Source folder (where the compiler is looking up the .java files)
sourceSets {
main.java.srcDir "src/main"
@xgenvn
xgenvn / Install PyQt5 on Ubuntu with python3 .md
Created Aug 1, 2019 — forked from ujjwal96/Install PyQt5 on Ubuntu with python3 .md
Install PyQt5 on Ubuntu with python3. Steps to set up PyQt5 (ubuntu). With python code generation
View Install PyQt5 on Ubuntu with python3 .md

Installation

pip3 install --user pyqt5  
sudo apt-get install python3-pyqt5  
sudo apt-get install pyqt5-dev-tools
sudo apt-get install qttools5-dev-tools

Configuring to run from terminal

@xgenvn
xgenvn / docker-compose.yml
Created Jul 30, 2019 — forked from ninformations/docker-compose.yml
Docker compose file to start a local arangodb cluster
View docker-compose.yml
version: '2'
services:
agency:
image: arangodb/arangodb
environment:
- ARANGO_ROOT_PASSWORD=openSesame
command: --server.jwt-secret=openSesameJWT --database.password openSesame --server.endpoint tcp://0.0.0.0:5001 --agency.activate true --agency.size 1 --agency.supervision true
coordinator:
image: arangodb/arangodb
View readme.md
sudo add-apt-repository ppa:linuxuprising/java
sudo apt update
sudo apt install oracle-java12-installer
@xgenvn
xgenvn / fission-minikube-helm.sh
Created Apr 27, 2019 — forked from sanketsudake/fission-minikube-helm.sh
Fission with Minikube and Helm
View fission-minikube-helm.sh
# Install virtualbox
sudo apt install virtualbox
# Install Kubectl
curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/darwin/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin
# Install Minikube
curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.14.0/minikube-darwin-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/
# Launch Minikube
minikube start
@xgenvn
xgenvn / attached_property_vs_behavior.md
Last active Apr 10, 2019
AttachedProperty vs Behavior
View attached_property_vs_behavior.md

Attached Property

public static class FocusOnLoad
{
    public static bool GetCanFocusOnLoad(DependencyObject obj)
    {
        return (bool)obj.GetValue(CanFocusOnLoadProperty);
    }
 
@xgenvn
xgenvn / ffmpeg-compress-mp4
Created Apr 2, 2019 — forked from lukehedger/ffmpeg-compress-mp4
Compress mp4 using FFMPEG
View ffmpeg-compress-mp4
$ ffmpeg -i input.mp4 -vcodec h264 -acodec mp2 output.mp4
View async_await_best_practices_cheatsheet.md

Async Await Best Practices Cheat Sheet

Summary of Asynchronous Programming Guidelines

Name Description Exceptions
Avoid async void Prefer async Task methods over async void methods Event handlers
Async all the way Don't mix blocking and async code Console main method
Configure context Use ConfigureAwait(false) when you can Methods that require con­text
@xgenvn
xgenvn / face_cropper.py
Created Mar 16, 2019 — forked from tilfin/face_cropper.py
Face detect and crop by using OpenCV
View face_cropper.py
import cv2
import sys
import os
class FaceCropper(object):
CASCADE_PATH = "data/haarcascades/haarcascade_frontalface_default.xml"
def __init__(self):
self.face_cascade = cv2.CascadeClassifier(self.CASCADE_PATH)
You can’t perform that action at this time.