Skip to content

Instantly share code, notes, and snippets.

View Gowee's full-sized avatar
🙂

Hung-I Wang Gowee

🙂
View GitHub Profile
@simonw
simonw / how-to.md
Last active March 26, 2024 23:21
How to create a tarball of a git repository using "git archive"
@gumblex
gumblex / WWStarClone.py
Last active May 4, 2016 14:59
Clone of WWStar, an ancient Classical Chinese translator.
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import sys
'''
Clone of WWStar, an ancient Classical Chinese translator.
usage: python3 WWStarClone.py [dir]
@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
...
# 小写希腊字母
@josue
josue / pdf-conversion-fun.md
Last active December 10, 2023 15:11
Using ImageMagick to easily: Split, Merge, Remove a page from PDF.

Install Required libraries:

sudo apt-get update && sudo apt-get install imagemagick gs

create directory to test commands

mkdir -p pdf_conversion/{merged,split}
cd pdf_conversion
@drmalex07
drmalex07 / README-setup-tunnel-as-systemd-service.md
Last active April 30, 2024 01:32
Setup a secure (SSH) tunnel as a systemd service. #systemd #ssh #ssh-tunnel #ssh-forward

README

Create a template service file at /etc/systemd/system/secure-tunnel@.service. The template parameter will correspond to the name of target host:

[Unit]
Description=Setup a secure tunnel to %I
After=network.target
@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'
@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
@messa
messa / asyncio_ssl_example.py
Created June 26, 2015 12:43
Python asyncio + SSL TCP client/server example
#!/usr/bin/env python3
import asyncio
import multiprocessing
import os
import ssl
from time import sleep
port = 9000
@samhocevar
samhocevar / gist:00eec26d9e9988d080ac
Last active January 13, 2024 23:40
Configure sshd on MSYS2 and run it as a Windows service
#!/bin/sh
#
# msys2-sshd-setup.sh — configure sshd on MSYS2 and run it as a Windows service
#
# Please report issues and/or improvements to Sam Hocevar <sam@hocevar.net>
#
# Prerequisites:
# — MSYS2 itself: http://sourceforge.net/projects/msys2/
# — admin tools: pacman -S openssh cygrunsrv mingw-w64-x86_64-editrights
#
@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!