Skip to content

Instantly share code, notes, and snippets.

View Gowee's full-sized avatar
🙂

Hung-I Wang Gowee

🙂
View GitHub Profile
@Arnie97
Arnie97 / remove_watermark.py
Last active July 31, 2022 12:50
Removes the annoying watermarks of it-ebooks.info's downloaded eBooks
#!/usr/bin/env python3
import sys
import re
import shutil
import argparse
import binascii
#
# Author: Daxda
@riobard
riobard / tcpdump.txt
Last active August 12, 2022 08:19
Poem lines broadcast by my ISP-provided fiber optical modem
# My ISP-provided fiber optical modem broadcasts a line of a poem every ten seconds. Here's the tcpdump of the complete poem.
# The optical modem is made by Shanghai Nokia-Bell Co.,Ltd and its model number is G-140W-UD. It's provided by my ISP, China Unicom in Shenzhen.
$ tcpdump -i vlan10 ether proto 0x8300
15:59:00.720301 00:00:00:00:00:12 (oui Ethernet) > Broadcast, ethertype Unknown (0x8300), length 72:
0x0000: 0000 0000 e4ea 8386 d93c 5468 6520 6461 .........<The.da
0x0010: 7920 4920 6c6f 7374 206d 7920 7665 7279 y.I.lost.my.very
0x0020: 2066 6972 7374 2074 6f6f 7468 2c00 0000 .first.tooth,...
0x0030: 0000 0000 0000 0000 0000 ..........
15:59:10.740778 00:00:00:00:00:12 (oui Ethernet) > Broadcast, ethertype Unknown (0x8300), length 72:
@spacestate1
spacestate1 / csv2wikitable.py
Last active August 14, 2022 03:31 — forked from 0ncorhynchus/csv2wikitable.py
convert csv to wiki table
#!/usr/bin/python
"""
Usage: python csv2wikitable.py csv_file
-----
input: csv format
output: wiki table format
"""
@JAStanton
JAStanton / _readme.md
Last active August 21, 2022 01:11
MITM Chrome Extension

How to MITM with a chrome extension

  • Download these files and update them
  • goto chrome://extensions and drag the parent folder holding these files into the window (you may need to turn chrome extension developer mode on)
  • goto website and watch the magic.

For some extra awesomeness replace a javascript file with a js file from dropbox with ?dl=1 at the end of the js url. Now you can modify the file locally, it will update itself, and you just have to refresh the browser. Pretty cool!

@AlephAlpha
AlephAlpha / greek.dict.yaml
Last active December 5, 2022 08:19
Rime 的希腊字母输入方案,也支持一些常用的数学符号。如果需要在其他输入方案中直接输入希腊字母,请参考:https://gist.github.com/lotem/3705586
# Rime dictionary
# encoding: utf-8
---
name: greek
version: "0.1"
sort: original
...
# 小写希腊字母
from typing import Any, Dict, List, Mapping, Union
# Values for JSON that aren't nested
JSON_v = Union[str, int, float, bool, None]
# If MyPy ever permits recursive definitions, just uncomment this:
# JSON = Union[List['JSON'], Mapping[str, 'JSON'], JSON_v]
# Until then, here's a multi-layer way to represent any (reasonable) JSON we
# might send or receive. It terminates at JSON_4, so the maximum depth of

hi, and goodbye

The past few weeks has not been fun on IRC, the drama based on false information and assumptions has been insane. I've almost entirely been silent on the drama because I know the fallout that would happen if I spoke up.

A quick TLDR - I'm quitting all IRC development. KiwiIRC project lead, IRCv3 technical board, supporting the multitude of IRC networks, the lot.

Many people seem to think that I am supporting one side in everything that is going on, so just to be clear: I am not supporting any side of the current freenode drama - there is so much false information going around from everywhere that it is impossible to support anybody.

Woo freenode drama

@jcouyang
jcouyang / contribution-svg.rb
Last active February 11, 2023 22:32
SVG image for your github contributions calendar
require "nokogiri"
require "open-uri"
url = "https://github.com/#{params['username']}"
document = Nokogiri::HTML(open(url))
contrib_boxes = document.css('svg.js-calendar-graph-svg')[0]
contrib_boxes['xmlns']="http://www.w3.org/2000/svg"
width = (params['width']||54*13-2).to_i
height = (params['height']||89).to_i
contrib_boxes.css('text').remove
contrib_boxes['width']=(width+11).to_s+'px'

测试平台:DigitalOcean VPS ubuntu14.04 x64, strongswan5.2.2

运行以下命令请使用root权限

一:安装strongswan

由于ubuntu软件仓库中strongswan版本较低,因此从官网源码编译安装

apt-get install build-essential     #编译环境
aptitude install libgmp10 libgmp3-dev libssl-dev pkg-config libpcsclite-dev libpam0g-dev     #编译所需要的软件
@DejanBelic
DejanBelic / async await ie11.js
Last active May 11, 2023 15:09
How to use async await in ie11
// Async await func
async function getTimelineData() {
var response = await fetch('/some-api-url')
return response.json()
}
async function populateTimelineInit() {
var data = await getTimelineData();
new vis.DataSet(data);