Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View mfkenson's full-sized avatar
🇭🇰
Focus

Kenson Leung W.K mfkenson

🇭🇰
Focus
View GitHub Profile
@mfkenson
mfkenson / Install NVIDIA Driver and CUDA.md
Created October 29, 2019 20:26 — forked from zhanwenchen/Install NVIDIA Driver and CUDA.md
Install NVIDIA CUDA 9.0 on Ubuntu 16.04.4 LTS
@mfkenson
mfkenson / notion-custom-domain.js
Created October 26, 2019 21:13 — forked from mayneyao/notion2blog.js
notion.so custom domain
const MY_DOMAIN = "your domain"
const START_PAGE = "start page url"
addEventListener('fetch', event => {
event.respondWith(fetchAndApply(event.request))
})
const corsHeaders = {
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "GET, HEAD, POST,PUT, OPTIONS",
@mfkenson
mfkenson / install_ros_kinetic_on_ubuntu.sh
Last active October 8, 2019 03:51 — forked from bugra-derre/install_ros_kinetic_on_ubuntu.sh
Install ROS on Ubuntu, either for Ubuntu Desktop or Ubuntu Server.
#!/bin/bash
# -------------------------------------------------------------------------
# [Bugra] install_ros_kinetic_on_ubuntu.sh
# An installation script to install ROS on top of Ubuntu Xenial.
# -------------------------------------------------------------------------
doTheInstallation() {
# setup my sources.list
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
# set up your keys
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
@mfkenson
mfkenson / deploy-gh.sh
Created September 2, 2018 06:45 — forked from nicobytes/deploy-gh.sh
Deploy gh-pages ionic pwa
#!/bin/bash
git branch -D gh-pages
git push origin --delete gh-pages
git checkout -b gh-pages
ionic build --prod
find . -type d ! -path './www*' ! -path './.git*' ! -path '.' | xargs rm -rf
rm -r *.*
mv www/* .
rm -rf www
git add .
@mfkenson
mfkenson / datatable.py
Created May 1, 2018 08:45 — forked from sirpercival/datatable.py
DataTable widget for kivy
from kivy.lang import Builder
from kivy.uix.gridlayout import GridLayout
from kivy.properties import DictProperty, NumericProperty, StringProperty, \
BooleanProperty, ObjectProperty
from operator import itemgetter
from kivy.uix.button import Button
from kivy.uix.textinput import TextInput
from kivy.uix.label import Label
Builder.load_string("""
@mfkenson
mfkenson / 1_Install_Tidbit.sh
Created April 14, 2016 04:14 — forked from chicks/1_Install_Tidbit.sh
Load Testing Sugar Cheat Sheet
# Download from here: https://github.com/sugarcrm/Tidbit
# Copy Tidbit to your Sugar Root and unpack
cp Tidbit-master.zip /var/www/html
unzip Tidbit-master.zip
# Run Tidbit
cd Tidbit
php -f install_cli.php -- -c