/**
* XXXXX的文件
*
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <reg51.h> | |
#define LED P1 | |
// (c) 2020 SuperSonic (https://github.com/supersonictw) | |
sbit buzzer = P0 ^ 1; | |
void delay500us(int); | |
void pulse_bz(int, int, int); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /usr/bin/env python3 | |
# (c) 2020 SuperSonic (https://github.com/supersonictw) | |
import random | |
def int_split(num: int): | |
return [i for i in str(num)] | |
def int_com(num: list): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# control_program.sh | |
# To control program in shell | |
# License: MIT (https://ncurl.xyz/s/RD0Yl5fSg) | |
# https://gist.github.com/supersonictw/007bfb79d6c7bbfc7658549d3c52ab60 | |
case $2 in | |
"start" ) | |
if [ -f "/tmp/.cp_lock-$1" ]; then | |
echo "The pidfile already exists." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
Violet - The default schema for StarStart! Service | |
https://github.com/star-inc/butterfly | |
(c)2020 Star Inc. | |
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/. | |
--> | |
<!-- Move to https://github.com/star-inc/violet --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# autocompile_golang.bash | |
# To auto-compile programs for every platforms Go supported | |
# (c)2020 Star Inc. (https://starinc.xyz) | |
# https://golang.org/doc/install/source#environment | |
GOOS_LIST=('android' 'darwin' 'linux') | |
GOARCH_LIST=('386' 'amd64' 'arm' 'arm64') | |
BUILD_LOG_LIST='.compile_log' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Afghanistan": { | |
"zh_TW": "阿富汗", | |
"location": [ | |
33, | |
65 | |
] | |
}, | |
"Albania": { | |
"zh_TW": "阿爾巴尼亞", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Given a URL, normalize that URL. | |
* @param String URL | |
* @return String Normalized URL | |
*/ | |
function normalizeUrl($input_url) | |
{ | |
$newUrl = ""; | |
$url = parse_url($input_url); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
# opi_fan - Cold down the temperature of OPi automatically. | |
# License: MIT (https://ncurl.xyz/s/RD0Yl5fSg) | |
# https://gist.github.com/supersonictw/046e10024038c18ccb46cbf3f1a88b79 | |
from sys import argv | |
from time import sleep | |
from gpiod import ( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name 取得基本課表資料 | |
// @namespace https://gist.github.com/supersonictw/81535219f2505a29b4787935c851d6ed | |
// @version 0.1.7 | |
// @description 把高科課表轉為JSON資料型態 | |
// @author SuperSonic (https://github.com/supersonictw) | |
// @match https://mobile.nkust.edu.tw/Student/Course* | |
// @license MIT License | |
// @grant none | |
// ==/UserScript== |
OlderNewer