Skip to content

Instantly share code, notes, and snippets.

@denny0223
denny0223 / cloc.txt
Created August 14, 2018 08:52
coscup.org cloc
./2016-landingpage
13 text files.
classified 13 files
13 unique files.
70 files ignored.
http://cloc.sourceforge.net v 1.56 T=0.5 s (14.0 files/s, 9560.0 lines/s)
-------------------------------------------------------------------------------
Language files blank comment code
-------------------------------------------------------------------------------
@denny0223
denny0223 / send_email.py
Last active September 5, 2017 16:20
Send mail
# -*- coding: UTF-8 -*-
def send_email(recipient):
import smtplib
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
from email.header import Header
from email.utils import formataddr
gmail_user = ''
@denny0223
denny0223 / keybase.md
Created February 27, 2017 22:34
keybase.md

Keybase proof

I hereby claim:

  • I am denny0223 on github.
  • I am denny0223 (https://keybase.io/denny0223) on keybase.
  • I have a public key whose fingerprint is F1FB 7517 0086 C1A7 8CF8 8CDC 2C96 0CDA 8456 1515

To claim this, I am signing this object:

@denny0223
denny0223 / scenario-staff.json
Last active March 5, 2017 09:29
SITCON Staff Checking Scenario
{
"checkin": {
"order": 0,
"available_time": "2017/03/18 07:30 +0800",
"expire_time": "2017/03/18 17:00 +0800",
"countdown": 0,
"related_scenario": [
{
"id": "kit",
"unlock": true
@denny0223
denny0223 / solutions.md
Last active July 11, 2022 22:12
cmdchallenge.com solutions

hello_world/

$ echo "hello world"

current_working_directory/

$ pwd
@denny0223
denny0223 / main.sh
Created October 1, 2015 15:21
FB message count ranking
token=''
res=$(curl -s "https://graph.facebook.com/v2.0/fql?access_token=$token&debug=all&format=json&method=get&pretty=0&q=SELECT%20viewer_id%2Crecipients%2Cmessage_count%20FROM%20thread%20WHERE%20folder_id%20%3D%200%20ORDER%20BY%20message_count%20DESC&suppress_http_code=1")
data=$(echo $res | jq '.data')
for i in $(seq 0 $(($(echo $data | jq '. | length') - 1)))
do
echo No. $((i + 1))
echo $data | jq ".[$i].message_count"
for fbid in $(echo $data | jq ".[$i].recipients[1:] | .[]")
@denny0223
denny0223 / SITCON 2015 IRC log
Created March 7, 2015 15:18
SITCON 2015 IRC log
--- Day changed Sat Mar 07 2015
00:18 < mmis1000> no[$ne]=zzzz 這樣
00:21 < mmis1000> express預設的querystring parser會展開物件
00:21 < mmis1000> Takeshi_tw:
00:21 < mmis1000> 上面那個會被展開成 no = {$ne : zzzz}
00:33 < seadog007> mmis1000: 直接丟PR啦
00:39 < mmis1000> 要出門去了說...正準備整理東西
01:29 < testttt> hihi
01:30 < testttt> hi
01:34 < jeremy5189> hello
@denny0223
denny0223 / slide
Created February 9, 2015 01:33
SITCON2015-cadre-training-shell-script
--withborder
--center SITCON Cadre Training
--center shell script data analysis
--author Denny Huang
--date today
@denny0223
denny0223 / 01-trackpoint.conf
Created January 18, 2015 09:14
01-trackpoint.conf
Section "InputClass"
Identifier "Wheel Emulation"
MatchIsPointer "on"
MatchProduct "TrackPoint"
Option "EmulateWheelButton" "2"
Option "EmulateWheel" "on"
EndSection
@denny0223
denny0223 / jsdc-tw.log
Created October 12, 2014 16:45
JSDC 2014 IRC log
--- Log opened Sat Oct 11 09:49:58 2014
10:21 < inndy> 好少人噢 XDDDD
10:22 < inndy> 雖然沒參加但是來IRC亂入一下
10:22 < elct9620> 我一開始以為是 #jsdc.tw 然後 Denny 跟我說是 jsdc-tw 才走對 QAQ
10:24 < isken> 今年怎麼都沒有人?
10:50 < elct9620> @DennyHuang 我忍不住開 Hackpad 了 0w0 https://hackpad.com/JSDC-2014--KXpB9VI4s1X
11:13 < zero-fubuki[R0]> R2 似乎會非常非常多人
11:14 < chiehyou> elct9620: 感謝你!
11:15 < elct9620> 我等一下在 R2 所以 R1 需要支援
11:15 < zero-fubuki[R0]> R0 吧