Skip to content

Instantly share code, notes, and snippets.


Myles Fang myleshk

Block or report user

Report or block myleshk

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
myleshk / nodejs_webserver_test.js
Last active Oct 20, 2017
nodejs simple webserver test
View nodejs_webserver_test.js
const http = require('http');
const hostname = '';
const port = 3000;
const server = http.createServer((req, res) => {
res.statusCode = 200;
res.setHeader('Content-Type', 'text/plain');
res.end('Hello World\n');
myleshk /
Last active Nov 21, 2017
Specific version of MySQL 5.6 install on Ubuntu 14.04
# This script is not fully tested against data safety. Backup data and use at your own risk.
# To get available MySQL 5.6 versions, refer to
version=$(cat /etc/*release | grep -Po '(?<=^VERSION_ID=")[0-9.]+')
sys_name=$(cat /etc/*release | grep -Po '(?<=^NAME=").*(?=")')
myleshk / kafka
Last active Jan 2, 2018
Init Script for Apache Kafka as Ubuntu Service (Deprecated)
View kafka
#! /bin/sh
# Provides: kafka
# Required-Start: $local_fs $remote_fs $network $syslog $named
# Required-Stop: $local_fs $remote_fs $network $syslog $named
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Kafka server
myleshk / kafka-zookeeper.service
Last active Jan 3, 2018
Run Kafka & Zookeeper & Luigid using systemd on Ubuntu 16.04
View kafka-zookeeper.service
Description=Apache Zookeeper server (Kafka)
myleshk / config.ini.template
Last active Mar 20, 2018
Fill dummy records into tracking_video_pings_per_hour so its records for old videos matches table tracking_video_pings
View config.ini.template
user = user
password = password
host = localhost
database = edxapp_event
myleshk / .gitignore
Last active Mar 21, 2018
DB Migration Tool
myleshk / Setup edX notes
Last active Mar 25, 2019
edx notes api setup
View Setup edX notes
  1. Goto https://<your-lms-url>/admin. On the admin page, go to "Oath2" and click "Add" by "Clients". Fill out the following fields.
Item Value
User <leave blank>
Name edx-notes
Url https://<your-notesserver-url>
Redirect uri https://<your-notesserver-url>/complete/edx-oidc/
Client id <generated>
Client secret <generated>
You can’t perform that action at this time.