Skip to content

Instantly share code, notes, and snippets.

View xgenvn's full-sized avatar

TuNA xgenvn

View GitHub Profile
@xgenvn
xgenvn / scale.md
Created August 13, 2019 09:15
Skill Competence 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.

@xgenvn
xgenvn / gradle-cheatsheet.gradle
Created August 8, 2019 16:37 — forked from jahe/gradle-cheatsheet.gradle
Gradle Cheatsheet
// 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 August 1, 2019 01:34 — forked from r00tdaemon/Install PyQt5 on Ubuntu with python3 .md
Install PyQt5 on Ubuntu with python3. Steps to set up PyQt5 (ubuntu). With python code generation

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 July 30, 2019 04:46 — forked from ninformations/docker-compose.yml
Docker compose file to start a local arangodb cluster
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
@xgenvn
xgenvn / readme.md
Created July 8, 2019 06:43
JDK 12 Ubuntu
sudo add-apt-repository ppa:linuxuprising/java
sudo apt update
sudo apt install oracle-java12-installer
@xgenvn
xgenvn / fission-minikube-helm.sh
Created April 27, 2019 13:27 — forked from sanketsudake/fission-minikube-helm.sh
Fission with Minikube and Helm
# 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 April 10, 2019 04:29
AttachedProperty vs Behavior

Attached Property

public static class FocusOnLoad
{
    public static bool GetCanFocusOnLoad(DependencyObject obj)
    {
        return (bool)obj.GetValue(CanFocusOnLoadProperty);
    }
 
@xgenvn
xgenvn / ffmpeg-compress-mp4
Created April 2, 2019 03:59 — forked from lukehedger/ffmpeg-compress-mp4
Compress mp4 using FFMPEG
$ ffmpeg -i input.mp4 -vcodec h264 -acodec mp2 output.mp4
@xgenvn
xgenvn / async_await_best_practices_cheatsheet.md
Created March 29, 2019 04:34 — forked from jonlabelle/async_await_best_practices_cheatsheet.md
C# Asynchronous Programming Guideline Cheat Sheet

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 March 16, 2019 16:23 — forked from tilfin/face_cropper.py
Face detect and crop by using OpenCV
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)