Skip to content

Instantly share code, notes, and snippets.

Avatar

michaellee8

View GitHub Profile
View docker-compose.yml
version: '3.4'
services:
osx:
container_name: docker-osx
image: sickcodes/docker-osx:big-sur
privileged: true
environment:
- DISPLAY=${DISPLAY:-:0.0}
network_mode: "host"
@michaellee8
michaellee8 / dcard-author-only.sh
Created May 8, 2021
Dcard comment reader with author only command
View dcard-author-only.sh
curl -s "https://www.dcard.tw/service/api/v2/posts/230723124/comments?limit=100&after=0" | jq '.[] | select(.host==true) | .content'
@michaellee8
michaellee8 / BigInt.cpp
Created Apr 12, 2020 — forked from ar-pa/BigInt.cpp
bignum class for C++
View BigInt.cpp
// In the name of Allah.
// We're nothing and you're everything.
// Ya Ali!
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn = 1e2 + 14, lg = 15;
@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
}
}
],