Skip to content

Instantly share code, notes, and snippets.

View hoangnd-monkey's full-sized avatar

Nguyễn Đức Hoàng hoangnd-monkey

  • HCMC, Việt nam
View GitHub Profile
@hoangnd-monkey
hoangnd-monkey / README.md
Created May 21, 2024 13:11 — forked from ullaskunder3/README.md
Detail flutter installation without android studio just using cmdline-tools, git, cmd

Flutter install without android studio

set flutter

Download flutter

tar xvf flutter_linux_1.17.5-stable.tar.xz

@hoangnd-monkey
hoangnd-monkey / build.yml
Created January 6, 2024 10:28 — forked from mihkels/build.yml
Build Spring Boot with Gradle and push docker image to Github Docker registry
name: build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
gradle:
runs-on: ubuntu-latest
@hoangnd-monkey
hoangnd-monkey / Dockerfile
Created September 15, 2023 14:30 — forked from hermanbanken/Dockerfile
Compiling NGINX module as dynamic module for use in docker
FROM nginx:alpine AS builder
# nginx:alpine contains NGINX_VERSION environment variable, like so:
# ENV NGINX_VERSION 1.15.0
# Our NCHAN version
ENV NCHAN_VERSION 1.1.15
# Download sources
RUN wget "http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz" -O nginx.tar.gz && \
@hoangnd-monkey
hoangnd-monkey / adbUsefulCommands.sh
Created August 31, 2023 09:41 — forked from aminone/adbUsefulCommands.sh
A collection of Android Debug Bridge (ADB) commands
# To get file
adb pull <PATH/TO/FILE/ON/DEVICE>
# To push file
adb push <PATH/TO/FILE> <PATH/TO/DESTINATION>
# To get wifi MAC address
adb shell cat /sys/class/net/wlan0/address
# To get IP Address
@hoangnd-monkey
hoangnd-monkey / SpringAutoRefreshConfigurationProperties.java
Created September 6, 2021 10:20 — forked from kubamarchwicki/SpringAutoRefreshConfigurationProperties.java
Autorefreshable configuration in Spring. To reload run with `--application.config.location=file:/tmp/data.properties`
package com.example.properties;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.boot.SpringApplication;
@hoangnd-monkey
hoangnd-monkey / example_ops_manual.md
Created August 29, 2019 08:33 — forked from benjaminballard/example_ops_manual.md
Example VoltDB Operations Manual

VoltDB Operations Manual

This is an example of a document that a VoltDB customer or partner might write to document specific processes and commands for common operations with VoltDB.

Hardware & OS

For our VoltDB cluster, use servers with the following specs:
(Note: this is only an example, but you should document the exact hardware used for the installation, and use identical hardware if nodes to the cluster).

Amazon EC2 Example:

In production, we use c3.2xlarge nodes with 8 hyperthreads, 15GB of RAM

@hoangnd-monkey
hoangnd-monkey / AgentRunner.java
Created June 28, 2019 07:11 — forked from xnike/AgentRunner.java
Simple snippet to show how to attach javaagent to running JVM process
import com.sun.tools.attach.VirtualMachine;
import com.sun.tools.attach.VirtualMachineDescriptor;
public class AgentRunner {
/*
* This class shows how to attach hotswap-agent.jar to a running JVM process and overload classes using "extraClasspath=" property via Hotswapper plugin.
*
* Lets assume that:
* args[0] contains pid of running JVM process or a runner class name we want to attach agent to
@hoangnd-monkey
hoangnd-monkey / README.md
Created June 14, 2019 17:10 — forked from fahadysf/README.md
A multiprocess task broker which accepts and provides status reports for tasks using JSON REST API calls.

Multiprocess Task Broker with REST API

This gist shows and example or an asynchronous multiprocess task broker which can take job requests and report on running jobs via a minimal REST API.

Adapted from https://gist.github.com/nitaku/10d0662536f37a087e1b

All of the caveats from the original author still apply.

@hoangnd-monkey
hoangnd-monkey / NotificationService.java
Created December 28, 2018 09:00 — forked from suwhs/NotificationService.java
Android: Catch Other Apps Notifcations With Accessibility Service
package su.whs.notifications;
import android.accessibilityservice.AccessibilityService;
import android.accessibilityservice.AccessibilityServiceInfo;
import android.app.Notification;
import android.view.accessibility.AccessibilityEvent;
public class NotificationService extends AccessibilityService {
@Override
public void onAccessibilityEvent(AccessibilityEvent event) {