Skip to content

Instantly share code, notes, and snippets.

View liu-yihong's full-sized avatar
🏠
Working from home

Yihong Liu liu-yihong

🏠
Working from home
View GitHub Profile
@HoussemNasri
HoussemNasri / BalsamiqForever.py
Last active November 2, 2025 10:46
Extend your trial period for Balsamiq Wireframes on Windows and macOS Forever!
import json
import os
import time
import webbrowser
import sys
import re
def handleWindows(extra_seconds):
print("OS : Windows")
@kylemcdonald
kylemcdonald / CUDA Argmax Comparison.ipynb
Created January 8, 2019 04:57
argmax with CUDA in cupy vs pytorch vs tensorflow
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@alexeygrigorev
alexeygrigorev / tqdm_pool.py
Created December 6, 2018 15:36
Track progress of ProcessPoolExecutor with tqdm
from glob import glob
import multiprocessing
from concurrent.futures import ProcessPoolExecutor
import cv2
from PIL import Image
import imagehash
from tqdm import tqdm

Flash Asus TM-AC1900 to Asus RT-AC68U

Asus TM-AC1900 is a T-Mobile rebranded router but exactly the same hardware as a RT-AC68U. It is touted as one of the best available routers in the market and is highly rated. However, TM-AC1900 contains a T-Mobile firmware which runs several years behind the official Asus firmware available for the hardware. Thus, it is of interest to "flash" the offical firmware with a newer one.

NOTE: The router works smoothly even without flashing. Don't flash if you don't need to.

Steps

Depending on the pre-installed firmware on the CellSpot router, many instructions below may or may not work for everyone. Howevery, they worked for mine.

Files needed

@octavifs
octavifs / tmux_htop_local_install.sh
Last active December 4, 2024 08:41
Install tmux and htop statically without root
#!/bin/sh
# Script for installing tmux & htop on systems where you don't have root access.
# Inspired by https://gist.github.com/ryin/3106801
# tmux will be installed in $HOME/local/bin.
# htop will be installed in $HOME/local/bin.
# It's assumed that wget and a C/C++ compiler are installed.
# exit on error
set -e
@jeremyvaught
jeremyvaught / gist:d04d0b7b5e2fac7fde9ff5f772cd908b
Created August 23, 2017 14:02
Reddit Automoderator filters I'm using
# https://www.reddit.com/r/subreddit/wiki/config/automoderator
# Our own personal shaddowban list
author:
name:
# section comment (eg spammers)
- username1
- username2 # comment for specific user
# section comment (eg trolls)
- username3
action: remove
@f0k
f0k / cuda_check.py
Last active September 29, 2025 21:06
Simple python script to obtain CUDA device information
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Outputs some information on CUDA-enabled devices on your computer,
including current memory usage.
It's a port of https://gist.github.com/f0k/0d6431e3faa60bffc788f8b4daa029b1
from C to Python with ctypes, so it can run without compiling anything. Note
that this is a direct translation with no attempt to make the code Pythonic.
@jiayuzhou
jiayuzhou / TMAC1900_Merlin.md
Last active June 12, 2023 18:30
Flash Merlin to TM-AC1900

Flash Merlin (https://asuswrt.lostrealm.ca) experience

Bought TMobile Cellspot (TM-AC1900) and would like to flash Merlin firmware.

  1. Purchased router equipped with TMobile firmware version: 3.0.0.4.376_2827 Gateway address: 192.168.27.1

  2. Downgrade TMoble firmware to enable TELNET 1.1 Get into recovery mode (hold reset and power up, until ping TTL=100) 1.2 Downgrade to Tmobile firmware version: 3.0.0.4_376_1703 TRX use tftp binary transfer.

@mcaceresb
mcaceresb / listings-stata.tex
Created May 9, 2016 11:05
Listings Stata language definition
% ---------------------------------------------------------------------
% Program: listings-stata.tex
% Author: github.com/mcaceresb
% Purpose: Stata language definition for LaTeX listings package
% Usage: Add \input{listings-stata.tex} to your preamble
% Syntax from
% - https://github.com/isagalaev/highlight.js/blob/master/src/languages/stata.js
% - https://github.com/jpitblado/vim-stata/blob/master/syntax/stata.vim
% - http://fmwww.bc.edu/RePEc/bocode/s/synlightlist.ado
@lukas-h
lukas-h / license-badges.md
Last active October 20, 2025 22:24
Markdown License Badges for your Project

Markdown License badges

Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.

Notes

  • The badges do not fully replace the license informations for your projects, they are only emblems for the README, that the user can see the License at first glance.

Translations: (No guarantee that the translations are up-to-date)