Skip to content

Instantly share code, notes, and snippets.

View ttimasdf's full-sized avatar

Known Rabbit ttimasdf

View GitHub Profile
@ttimasdf
ttimasdf / IPTV_API_to_m3u8.md
Last active January 30, 2020 13:04
WASU IPTV box to m3u8 file

Fetch channels from WASU IPTV box web API and generate m3u8 from return data.

@ttimasdf
ttimasdf / fix_virtualenv
Last active September 4, 2019 15:18 — forked from tevino/fix_virtualenv
Fix python virtualenv after python update, forked version for choice of python executable
#!/usr/bin/env bash
ENV_PATH="$(dirname "$(dirname "$(which pip)")")"
SYSTEM_VIRTUALENV="$(which -a virtualenv|tail -1)"
echo "Ensure the root of current virtualenv:"
echo " $ENV_PATH"
read -p "‼️ Say no if you are not sure (y/N) " -n 1 -r
echo
PYEXC_DEF="$(sed -n '1s/^#!//p' $SYSTEM_VIRTUALENV)"
read -p "🐍 Choose which python to use? [$PYEXC_DEF] " PYEXC
@ttimasdf
ttimasdf / shadowsocks-server
Created April 27, 2019 14:21 — forked from evianzhow/shadowsocks-server
shadowsocks-server OpenWRT init.d script
#!/bin/sh /etc/rc.common
#
# Copyright (C) 2016 Jian Chang <aa65535@live.com>
# Copyright (C) 2016 Evian Zhow <evianzhow@gmail.com>
#
# This is free software, licensed under the GNU General Public License v3.
# See /LICENSE for more information.
#
START=90

STEPS

  • Click on Help menu

  • Select Enter License

  • Then paste given KEY given at bottom

  • Finally click on Use License

@ttimasdf
ttimasdf / cve.patch
Last active December 18, 2017 02:04
My cve-search patch
diff --git a/sbin/db_mgmt_cpe_dictionary.py b/sbin/db_mgmt_cpe_dictionary.py
index 4c904cf..37cd9c8 100755
--- a/sbin/db_mgmt_cpe_dictionary.py
+++ b/sbin/db_mgmt_cpe_dictionary.py
@@ -31,6 +31,7 @@ from lib.ProgressBar import progressbar
from lib.Toolkit import toStringFormattedCPE
from lib.Config import Configuration
import lib.DatabaseLayer as db
+from time import time
@ttimasdf
ttimasdf / zshrc.sh
Last active August 10, 2017 02:47
My .zshrc with ohmyzsh and bullet train theme, includes various utilities for easy life
export ZSH=/Users/u/.oh-my-zsh
# Bullet train needs powerline fonts unavailable in VSCode
# ps -p `ps -o pid,ppid | awk "/^ *$$/ {print \$2}"` | grep -q "Visual Studio Code" && ZSH_THEME="random"
[[ -n "$VSCODE_PID" ]] && ZSH_THEME="random" || ZSH_THEME="bullet-train"
plugins=(git brew virtualenv osx zsh-completions)
# DISABLE_AUTO_UPDATE="true"
# export UPDATE_ZSH_DAYS=13
BULLETTRAIN_CUSTOM_MSG="Rabbit!"