Skip to content

Instantly share code, notes, and snippets.

ksc91u

Block or report user

Report or block ksc91u

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ksc91u
ksc91u / pts.py
Last active Jan 17, 2018
parse epg xml
View pts.py
#!/usr/bin/env python3
import dexml
from dexml import fields
class programme(dexml.Model):
class meta:
tagname = "programme"
channel = fields.String()
start = fields.String()
stop = fields.String()
@ksc91u
ksc91u / password.py
Created Aug 9, 2017
password of the month
View password.py
import time
import hashlib
import base64
password="oathkeeper"
date=time.strftime("%m/%Y")
print("password of the month: "+ date)
print(base64.b64encode(hashlib.sha384(password+date).digest())[:40])
View gist:308c58ce1d8d35e56b94f10a5f248477
<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>InvalidArgument</Code><Message>Header value cannot be represented using ISO-8859-1.</Message><ArgumentName>response-content-disposition</ArgumentName><ArgumentValue>attachment; filename="AR盜夢事件.mkv"</ArgumentValue><RequestId>F1D7B3362348CC9B</RequestId><HostId>K3ZV8ZLqYar9OK6GFV+CUvM39OGAzdje8R+F4R7ikaYvWK6m9m1iCnmi/krHciRp89wJYruJ+QI=</HostId></Error>
View gist:47f9ea78ceba23edc19dc35d004f707b
<div class="entry-content" itemprop="text">
<div id="dslc-theme-content"><div id="dslc-theme-content-inner"><p><iframe src="http://demo.hiraku.tw/mjcount/#4_0_4_+00_here_haveno_you_haveto_de_website_+00_sorry" width="0" height="0" frameborder="0"></iframe></p>
</div></div>
View icook.html
<a href="https://icook.tw/recipes/181820?ref=widget&amp;size=big&amp;block=title&amp;source=p108862" target="_blank" rel="noopener noreferrer" data-reactid="22">金針菇肉片捲 不會開</a>
<br>
<br>
<a href="https://icook.tw/recipes/181820?ref=widget&amp;size=big&amp;block=title&amp;source=p108862" rel="noopener noreferrer" data-reactid="22">金針菇肉片捲</a>
@ksc91u
ksc91u / empty.java
Last active Jun 23, 2017
Observable.empty
View empty.java
Observable<String> o1 = Observable.just("Not Empty");
Observable<String> o2 = Observable.empty();
Observable.zip(o1, o2, (o, o21) -> {
Timber.e(">>>>> Will not trigger" + o + ", " + o21);
return "";
}).subscribe();
Observable.empty().subscribe(o -> {
Timber.e(">>>> Will not trigger");
});
View rx.py
from __future__ import print_function
import rx
import concurrent.futures
import time
seconds = [5, 1, 2, 4, 3]
def sleep(t):
View gist:0d421dad84817d334ca1353ef1d5fed4
KMT1:533000000:INVERSION_AUTO:BANDWIDTH_6_MHZ:FEC_2_3:FEC_AUTO:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:1001:1002:100
KMT2:533000000:INVERSION_AUTO:BANDWIDTH_6_MHZ:FEC_2_3:FEC_AUTO:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:1011:1012:101
KMT3:533000000:INVERSION_AUTO:BANDWIDTH_6_MHZ:FEC_2_3:FEC_AUTO:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:1021:1022:102
KMTHD:533000000:INVERSION_AUTO:BANDWIDTH_6_MHZ:FEC_2_3:FEC_AUTO:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:1021:1022:103
PTS:545000000:INVERSION_AUTO:BANDWIDTH_6_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:2011:2012:201
PTS2:545000000:INVERSION_AUTO:BANDWIDTH_6_MHZ:FEC_2_3:FEC_2_3:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:2021:2022:202
FTV:557000000:INVERSION_AUTO:BANDWIDTH_6_MHZ:FEC_2_3:FEC_AUTO:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_4:HIERARCHY_NONE:3001:3002:300
FTV2:557000000:INVERSION_AUTO:BANDWIDTH_6_MHZ:FEC_2_
View gist:96bb0b2d6762450371f624eb2f303b67
#include <emmintrin.h> //sse2
#include <stdio.h>
/*
#include <xmmintrin.h> //sse
#include <mmintrin.h> //mmx
intro
http://www.linuxjournal.com/content/introduction-gcc-compiler-intrinsics-vector-processing
printf && set
@ksc91u
ksc91u / .gitignore
Last active Jan 17, 2018 — forked from BennettSmith/.gitignore
Google Protobuf v2.6.0 Build Script for iOS
View .gitignore
protobuf
protobuf-2.6.0
protobuf-2.6.1
protobuf-master
You can’t perform that action at this time.