Skip to content

Instantly share code, notes, and snippets.

View linroex's full-sized avatar

Karl Lin linroex

View GitHub Profile

Keybase proof

I hereby claim:

  • I am linroex on github.
  • I am linroex (https://keybase.io/linroex) on keybase.
  • I have a public key ASBZF1Op3te_eVXwhjXEZPJWdiAxlXUSxNWhBhFJKIlBQgo

To claim this, I am signing this object:

[1] 10004: Bicoloring
[1] 10008: What's Cryptanalysis?
[1] 10010: Where's Waldorf?
[1] 10018: Reverse and Add
[1] 10019: Funny Encryption Method
[1] 10020: Minimal Coverage
[1] 10025: The ? 1 ? 2 ? ... ? n = k problem
[1] 10026: Shoemaker's Problem
[1] 10032: Tug of War
[1] 10035: Primary Arithmetic
@linroex
linroex / cc_schedule.go
Created February 3, 2022 18:23
schedule -s | go run cc_schedule.go > schedule_me.ics
package main
import (
"bufio"
"bytes"
"fmt"
"os"
"regexp"
"strings"
"text/template"
Date.prototype.addDays = function(days) {
this.setDate(this.getDate() + days);
return this;
}
var course_dom = document.querySelectorAll("tbody tr.ant-table-row")
var course_result = []
course_dom.forEach(function(course_) {
import json
from datetime import datetime
from glob import glob
from os import path
folder = path.dirname(path.realpath(__file__))
def clear():
from os import system, name as os_name
import csv
import json
from sys import argv
def parse_obj(obj):
for key in obj:
if isinstance(obj[key], str):
obj[key] = obj[key].encode('latin_1').decode('utf-8')
elif isinstance(obj[key], list):
@linroex
linroex / 1.sql
Last active September 4, 2019 06:02
messenger sql
WITH
messenger AS (
SELECT
room_id,
IF(sender_name='林熙哲', receiver_name, sender_name ) AS name,
MIN(dt) AS first_day,
COUNT(*) AS cnt
FROM
`facebook.messenger`
where
<!DOCTYPE html>
<html lang="zh-Hant-TW">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta property="og:title" content="">
<meta property="og:image" content="">
<meta property="og:description" content="">

Keybase proof

I hereby claim:

  • I am linroex on github.
  • I am linroex (https://keybase.io/linroex) on keybase.
  • I have a public key ASAoAY_9Tv86xEmM-q82wH6CeQJCEAw84Y3LIKg6V4dlrQo

To claim this, I am signing this object:

// 創造 img HTML 元素,並放入變數中
var bgImg = document.createElement("img");
// 設定這個元素的要顯示的圖片
bgImg.src = "images/map.png";
// 找出網頁中的 canvas 元素
var canvas = document.getElementById("game");
// 取得 2D繪圖用的物件