Skip to content

Instantly share code, notes, and snippets.

View DanielChuDC's full-sized avatar
🎯
Focusing

danielchu DanielChuDC

🎯
Focusing
  • singapore
View GitHub Profile

Generate Jar with dependencies (fatJar) using Gradle

There are multiple posts (old and new) with instructions on how to generate a fat jar, this is, a jar file for your application containing also your application's dependencies. Most solutions I have tried did not work for me, even in a simple Hello World java application, but I have found one that seems to work as expected.

Here it is:

Instructions

@DanielChuDC
DanielChuDC / README.md
Created January 4, 2023 08:46 — forked from hungvietdo/README.md
VI7: Node-link diagram and Adjacency matrix

Node-link Diagram

I added a new attribute to the dataset which is region.

In the node-link diagram, states in the same region likely stick together as they have links in between.

States in region which has less number of links spread out in the diagram. For example: look at the light-green color (South Atlantic), Florida is far apart with those states (DC, Maryland, Virginia, West Viginia, Delaware).

Thus, although the dataset is non-spatial, users can explore the relationship of nodes by looking the distance or number of hops in between.

@DanielChuDC
DanielChuDC / setupEnv.sh
Created December 27, 2022 14:18 — forked from dccampbell/setupEnv.sh
Linux Environment - Initial Setup Script
#!/usr/bin/env bash
echo "=== System Install Starting! ==="
# Variables
DL_DIR="$HOME/Downloads/EnvSetup" && mkdir -p "$DL_DIR"
BIN_DIR="$HOME/bin" && mkdir -p "$BIN_DIR"
source /etc/os-release #loads $UBUNTU_CODENAME
export DEBIAN_FRONTEND=noninteractive
@DanielChuDC
DanielChuDC / main.c
Created February 5, 2022 18:32 — forked from johnkawakami/main.c
Two examples of how to use GArray
#include <glib.h>
#include <stdio.h>
int main( int argc, char *argv[] )
{
GString *s;
GString gs;
GArray *a;
int i;
@DanielChuDC
DanielChuDC / install_python38_on_py.sh
Last active August 27, 2021 14:25 — forked from stephen-mw/install_python38_on_pi.sh
Install python3.8 and make the system default on Raspberry Pi
#!/usr/bin/env bash
set -euo pipefail
# This script downloads, compiles, and installs python3.8 as the system default
export VERSION=3.8.5
apt install -y \
build-essential \
libbz2-dev \
import 'package:flutter/material.dart';
@immutable
class ClipShadowPath extends StatelessWidget {
final Shadow shadow;
final CustomClipper<Path> clipper;
final Widget child;
ClipShadowPath({
@required this.shadow,
@DanielChuDC
DanielChuDC / poc.html
Created January 20, 2021 05:03 — forked from kenrick95/poc.html
Handles Play/Pause Media Key
<!DOCTYPE html>
<html lang="en" style="width: 100%; height: 100%;">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>PoC</title>
</head>
<body style="width: 100%; height: 100%;">
<audio
id="player"
@DanielChuDC
DanielChuDC / poc.html
Created January 20, 2021 05:03 — forked from kenrick95/poc.html
Handles Play/Pause Media Key
<!DOCTYPE html>
<html lang="en" style="width: 100%; height: 100%;">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>PoC</title>
</head>
<body style="width: 100%; height: 100%;">
<audio
id="player"
@DanielChuDC
DanielChuDC / auth.service.ts
Created July 24, 2020 12:34 — forked from codediodeio/auth.service.ts
Angular4 Firebase authentication service using OAuth, Anonymous, and Email/Password. Designed specifically for changes introduced in AngularFire2 4.0.0
import { Injectable } from '@angular/core';
import { AngularFireDatabaseModule, AngularFireDatabase, FirebaseListObservable } from 'angularfire2/database';
import { AngularFireAuth } from 'angularfire2/auth';
import { Router } from "@angular/router";
import * as firebase from 'firebase';
@Injectable()
export class AuthService {
@DanielChuDC
DanielChuDC / basic.md
Created July 24, 2020 01:48 — forked from zenorocha/basic.md
New Firebase Auth vs Old Firebase Auth