Skip to content

Instantly share code, notes, and snippets.

Ming Wen bitmingw

Block or report user

Report or block bitmingw

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
@bitmingw
bitmingw / increase_cpu.py
Created Nov 1, 2019
Scripts to increase system CPU, memory and fill up the disk in linux. Tested on ubuntu system.
View increase_cpu.py
#!/usr/bin/env python3
from argparse import ArgumentParser
from datetime import datetime, timedelta
from multiprocessing import Process
import random
def work(t):
current_time = datetime.now()
delta = timedelta(seconds=t)
@bitmingw
bitmingw / git_merger.sh
Last active Feb 21, 2017
Merge git branch.
View git_merger.sh
#!/bin/sh
# Automatic branch merging tool.
# Author: Ming Wen (bitmingw@gmail.com)
# Change the following variables according to your needs
GIT_DIR=/Users/$USER/project
MERGING_BRANCH=master
TO_BE_MERGED_BRANCH=dev
@bitmingw
bitmingw / git_batch_resolver.py
Last active Mar 26, 2020
Batch script to resolve large git conflicts.
View git_batch_resolver.py
#!/usr/bin/env python3
"""
Author: Ming Wen (bitmingw@gmail.com)
When resolving conflicts on a merge or rebase, this script
automates `git add/rm` and `git checkout` with --ours or --theirs
for a large batch of changes.
Usage: `./git_batch_resolver.py` in your git repository.
@bitmingw
bitmingw / github_sync.py
Last active Feb 16, 2017
Auto update local repository with remote github repository.
View github_sync.py
#!/usr/bin/env python3
"""
Author: Ming Wen (bitmingw@gmail.com)
This script is used to track the changes in the github, and if a new commit
is found, update the local repository accordingly.
"""
from urllib.request import urlopen
View ideagen.py
#!/usr/bin/env python3
"""
Web crawler and analysis of matrix67's ideagen
Author: Ming Wen
"""
from bs4 import BeautifulSoup
from urllib.request import urlopen
You can’t perform that action at this time.