Skip to content

Instantly share code, notes, and snippets.

View Gowee's full-sized avatar
🙂

Hung-I Wang Gowee

🙂
View GitHub Profile
@gumblex
gumblex / num2chinese.py
Created February 8, 2015 02:46
Numbers to Chinese representations converter in Python. 中文数字转换
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Licensed under WTFPL or the Unlicense or CC0.
# This uses Python 3, but it's easy to port to Python 2 by changing
# strings to u'xx'.
import itertools
def num2chinese(num, big=False, simp=True, o=False, twoalt=False):
@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
@misuzu
misuzu / oracle-cloud-nixos-install.md
Last active December 10, 2023 17:53
Install NixOS on Oracle Cloud over Ubuntu 18.04

Install NixOS on Oracle Cloud over Ubuntu 18.04 (make sure to use Ubuntu 18.04 or this may not work)

# install useful tools
sudo apt-get update
sudo apt-get install --no-install-recommends -y nano mc git

# prepare /boot
sudo umount /boot/efi
sudo mv /boot /boot.bak
@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
#
@woodongwong
woodongwong / iptv.tvfix.org.m3u8.txt
Last active January 18, 2024 02:12
iptv.tvfix.org(电视侠)直播源,see: https://github.com/woodongwong/tvfix
see: https://github.com/woodongwong/tvfix
@codehz
codehz / iprule.sh
Last active March 4, 2024 09:39
nftables for redir proxy
ip rule add fwmark 0x233 lookup 100
ip route add local 0.0.0.0/0 dev lo table 100
@vbajpai
vbajpai / opkgclean.sh
Last active March 5, 2024 17:06
If opkg runs out of space, it will not remove the files it was installing. Run this custom script in order recover the space by removing these files and the installed dependencies.
#!/bin/sh
#takes one argument/parameter: the name of the package which didn't install correctly and should be removed along with its dependencies
#do opkg update first
#example: ./opkgremovepartlyinstalledpackage.sh pulseaudio-daemon
#get list of all packages that would be installed along with package x
opkg update
PACKAGES=`opkg --force-space --noaction install $1 | grep http | cut -f 2 -d ' ' | sed 's/.$//'`
for i in $PACKAGES
do
@albertzsigovits
albertzsigovits / maps.txt
Last active March 20, 2024 16:07
Cyber Attack Maps
# Cyber attack maps:
####################
Akamai https://www.akamai.com/us/en/solutions/intelligent-platform/visualizing-akamai/real-time-web-monitor.jsp
Arbor Networks https://www.digitalattackmap.com
Bitdefender https://threatmap.bitdefender.com
BlueLiv https://community.blueliv.com/map
Cisco Talos https://www.talosintelligence.com
Checkpoint https://threatmap.checkpoint.com
Deutsche Telekom https://sicherheitstacho.eu/start/main
@simonw
simonw / how-to.md
Last active March 26, 2024 23:21
How to create a tarball of a git repository using "git archive"

The Freenode resignation FAQ, or: "what the fuck is going on?"

IMPORTANT NOTE:

It's come to my attention that some people have been spamming issue trackers with a link to this gist. While it's a good idea to inform people of the situation in principle, please do not do this. By all means spread the word in the communities that you are a part of, after verifying that they are not aware yet, but unsolicited spam is not helpful. It will just frustrate people.

Update 3 (May 24, 2021)

A number of things have happened since the last update.