Skip to content

Instantly share code, notes, and snippets.

View DC.md

12/19

19:40 ~ 23:10 Train 175 / Penn Station (NYP) → Union Station (WAS)****

23:10 ~ Go to hotel


12/20

View init.coffee
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
@kuoe0
kuoe0 / AndroidPresentationDeviceProvider.js
Last active Aug 15, 2016
Add a new XPCOM implemented by JavaScript
View AndroidPresentationDeviceProvider.js
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* jshint esnext:true, globalstrict:true, moz:true, undef:true, unused:true */
/* globals Components, dump */
"use strict";
dump("AndroidPresentationDeviceProvider.js loaded.");
const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
@kuoe0
kuoe0 / .autoenv.zsh
Created May 10, 2016
Autoenv for Gecko
View .autoenv.zsh
################################################################################
# Usage: ln -s </path/to/this/file> $GECKO/.autoenv.zsh
################################################################################
OS=$(uname)
autostash GECKO=$(git rev-parse --show-toplevel)
alias mach="$GECKO/mach"
# Load completion for mach
autoload bashcompinit
@kuoe0
kuoe0 / fft.py
Created Oct 12, 2014
Python FFT Example
View fft.py
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © 2014 KuoE0 <kuoe0.tw@gmail.com>
#
# Distributed under terms of the MIT license.
"""
View semantic-ui-style-range-input.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>semantic-slider</title>
<style>
.ui.slider.range input[type="range"] {
-webkit-appearance: none;
border-width: 1px;
View virtual_serial.py
#! /usr/bin/env python
#coding=utf-8
import pty
import os
import select
def mkpty():
#
@kuoe0
kuoe0 / divisible-by-3-fsm.y
Created Dec 14, 2013
check integer divisible by 3 using finite state machine
View divisible-by-3-fsm.y
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © 2013 KuoE0 <kuoe0.tw@gmail.com>
#
# Distributed under terms of the MIT license.
"""
@kuoe0
kuoe0 / divisible-by-3-alt-sum.py
Created Dec 14, 2013
check integer divisible by 3 using alternative sum
View divisible-by-3-alt-sum.py
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © 2013 KuoE0 <kuoe0.tw@gmail.com>
#
# Distributed under terms of the MIT license.
"""
@kuoe0
kuoe0 / divisible-by-3-hex.py
Created Dec 14, 2013
check integer divisible by 3 using hex
View divisible-by-3-hex.py
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © 2013 KuoE0 <kuoe0.tw@gmail.com>
#
# Distributed under terms of the MIT license.
"""