Skip to content

Instantly share code, notes, and snippets.


Hung-I Wang Gowee

View GitHub Profile
Gowee /
Created Jun 24, 2018
Rotate the avatar of Telegram based on the time in a day using Pyrogram(MTProto).
Gowee /
Created Nov 7, 2016
One-line Bash script to fetch the issuer CA certificate of an x509-specified certificate via id-ad-caIssuers of x509.v3 Authority Information Access extension.
# Maintainer: Gowe Wang<>
# Reference:
# Notice: Just available in most cases.
curl -s $(openssl x509 -in $1 -noout -text | grep -Po "((?<=CA Issuers - URI:)http://.*)$") | openssl x509 -inform DER -outform PEM
Gowee / pptpclient@.service
Last active Dec 3, 2016
systemd service script for pptpclient
View pptpclient@.service
# Modified from OpenVPN systemd service script.
Description=PPTP Client connection to %I
ExecStart=/usr/bin/pon %i persist
#!/usr/bin/env python3
import urllib.request
import re
from collections import namedtuple
from math import log
def ip2num(ip_address: str) -> int:
a, b, c, d = map(int, ip_address.split("."))
return (a << 24) + (b << 16) + (c << 8) + d
#!/usr/bin/dev python3
# -*- coding: utf-8 -*-
import requests
import json
from ics import Calendar, Event
import arrow
from uuid import uuid4
# Below are your credentials for log-in.
#!/usr/bin/dev python3
# -*- coding: utf-8 -*-
import requests
from bs4 import BeautifulSoup
import urllib.parse
import json
from PIL import Image
import pytesseract
import time
Gowee / getRawPostData.php
Created Nov 12, 2015
alternative for file_get_contents("php://input");
View getRawPostData.php
function getRawPostData(){
$eol = "\r\n";
$BOUNDARY = substr(ltrim(explode(";", $_SERVER["CONTENT_TYPE"])[1]), strlen("boundary="));
$postData = "";
foreach($_POST as $name => $value){
$postData .= "--" . $BOUNDARY . $eol;
$postData .= 'Content-Disposition: form-data; name="' . $name . '"' . $eol . $eol;
$postData .= $value . $eol;