Skip to content

Instantly share code, notes, and snippets.

💭
Fighting for what we value

michaellee8

💭
Fighting for what we value
Block or report user

Report or block michaellee8

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
@michaellee8
michaellee8 / fork-tasks-demo.c
Last active Oct 4, 2018
Inter-process communication using pipes |
View fork-tasks-demo.c
#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <stdlib.h>
#include <linux/limits.h>
#include <errno.h>
#include <string.h>
@michaellee8
michaellee8 / fork-pstree.c
Created Sep 27, 2018
Play with c fork and pstree
View fork-pstree.c
#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <stdlib.h>
void create_process(int current_level)
{
int parent = (int)getpid();
int child = (int)fork();
View tan-math-notes.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Tan Math notes</title>
<link rel="stylesheet" href="https://stackedit.io/style.css" />
</head>
@michaellee8
michaellee8 / revisioner-sba-deployment.md
Last active Nov 29, 2017
Revisioner SBA deployment instructions
View revisioner-sba-deployment.md

Before reading this documents, you should be acknowledged that the deployment process should only be done by people that have sufficient knowledge in the Information and Communication Technology. Stupidly deploying this program in an unproper way can results in breaking your computer or even more. You are also told that the author of this deployment guide cannot be hold liable for any contents in this guide and the corresponding app as well, use it at your own risk!

Contacts

If you find difficulties in deploying this application or you want to view the working demo, feel free to contact me via email ckmichael8@gmail.com. My github username is michaellee8.

Note:

  1. You will proably need sudo access or admistrator access to perform the below actions.
  2. Running the app server requires internet connection that can at least connect to the npm repo and google firebase, and the server have to be accessible from internet with proper internet setting like firewalls so that the firebase auth server ha
@michaellee8
michaellee8 / propsoal-gravitational-circular-transport-system
Created Oct 1, 2017
proposal-gravitational-circular-transport-system
View propsoal-gravitational-circular-transport-system
# Theoretical Proposal of Gravitational Circular Transport System
## Inspiration
In the recent discuss with Professor Chu Ming Chung, we concluded that theoretically, if we can produce sufficient gravitational wave from a massive object that is moving in an extreme speed, it is possible to achieve faster-than-light travel relative to a inertial reference frame.
![Gravitational wave from a pair of neutron stars orbiting.](https://upload.wikimedia.org/wikipedia/commons/b/b8/Wavy.gif "Gravitational wave from a pair of neutron stars orbiting.")
Two-dimensional representation of gravitational waves generated by two neutron stars orbiting each other. From Wikipedia., licensed under Public Domain.
![Relativistic Doppler effect of light wave](https://upload.wikimedia.org/wikipedia/commons/d/d4/Velocity0_70c.jpg "Relativistic Doppler effect of light wave")
@michaellee8
michaellee8 / FTL with fast-moving large mass
Last active Sep 27, 2017
ftl-on-fast-moving-large-mass
View FTL with fast-moving large mass
# Could this FTL idea with a fast moving large mass be possible?
I have recently come up with a possible way to achieve faster-than-light (FTL) travel by using a high speed singularity or large mass.
## Background
As everyone knows, according to relativity, under normal conditions, it is impossible for anything initially slower than light become as fast as light or even faster, because anything with mass requires infinite energy to approach speed of light.
However, speed is not the only factor of relativity, gravity will affect it as well. There was an [experiment](https://en.wikipedia.org/wiki/Tests_of_general_relativity) shows that even light will bend as it travels near a strong gravitational field, for example Sun. That observation shows space can be stretched with strong gravity, and give some insight to this idea.
@michaellee8
michaellee8 / data.json
Last active Sep 12, 2017
graphl script for query
View data.json
{
"includeAll": [
{
"model": "User",
"as": "user",
"where": {
"userId": 1
}
}
],
@michaellee8
michaellee8 / android-file-transfer.sh
Last active Jul 23, 2017
Fast android file transfer between devices/phones/tablets using adb
View android-file-transfer.sh
# Mini bash script to quickly copy files between android devices using adb
# dependencies : depends on adb, install first by sudo apt install adb
# $1 : serialno of source device
# $2 : serialno of destination device
# $3 : parent directory of file/dir to be copied
# $4 : name of file/dit to be copied
# example : bash android-file-transfer <device-sn-source> <device-sn-destination> /sdcard/ DCIM
# remarks : if it shows the devices is currently offline, set the device's USB mode to MTP
# remarks : to get serialno of connected devices, used adb devices -l
# remarks : uses USB 3.0 port if aviliable
View namelist.json
[{"lastName":"CHAN","firstName":["MEI","CHUN"],"class":"1A","classNo":1},{"lastName":"CHAN","firstName":["WING","YI"],"class":"1A","classNo":2},{"lastName":"CHAN","firstName":["YU","FUNG"],"class":"1A","classNo":3},{"lastName":"CHAU","firstName":["KIN","HANG"],"class":"1A","classNo":4},{"lastName":"CHAU","firstName":["WAI","YEE"],"class":"1A","classNo":5},{"lastName":"CHEN","firstName":["CHUN","HON"],"class":"1A","classNo":6},{"lastName":"CHENG","firstName":["HO","HEI"],"class":"1A","classNo":7},{"lastName":"CHEUNG","firstName":["YUN","TONG"],"class":"1A","classNo":8},{"lastName":"HAU","firstName":["CHEUK","LING"],"class":"1A","classNo":9},{"lastName":"HO","firstName":["KA","TUNG"],"class":"1A","classNo":10},{"lastName":"LAM","firstName":["HING","YI"],"class":"1A","classNo":11},{"lastName":"LAU","firstName":["YU","CHING"],"class":"1A","classNo":12},{"lastName":"LEE","firstName":["CHEUK","LAM"],"class":"1A","classNo":13},{"lastName":"LEUNG","firstName":["WING","KIU"],"class":"1A","classNo":14},{"lastName":"LI"
You can’t perform that action at this time.