Skip to content

Instantly share code, notes, and snippets.

View outloudvi's full-sized avatar
🌷
…なんてね。

Outvi V outloudvi

🌷
…なんてね。
View GitHub Profile
{"sig":"fe04de130ac991d3c8bbf05f42a546fe6e943eb9041cb512b08d3129410c9e83c680e67ac6f0bfaaba58be17efdd76e56721581be97e51ff724d8869f289385b0","msghash":"7a6413c01b628e1fc1a3267eaa0ce7f8c5e2b46731c004fd38de3a52acb87c4d"}
@outloudvi
outloudvi / mastohosts.sh
Created March 12, 2018 15:33
Mastodon hosts fix
#!/bin/bash
# mastohosts.sh, released to Public Domain
## 'sudo bash mastohosts.sh >> /etc/hosts' or something else
## and flush your DNS cache.
DNS=8.8.8.8 # Select your DNS,
HOSTS=(
"cmx.im"
https://press.one/p/address/v?s=22a6302eb4671ab2f3a38b5c650c34155304f3f0cfc2f96767455cd8018a56bd0e636ce8f592e55df7997104a8e3a744186ba3fc5df331f3dfeea88ae681a76c0&h=e5d466a27c83aac9c084dacfce548f66a8f0d2c979544cbad4b8f0e80a47c4b2&a=b696756d50a96f648ca74a160537acb5d7e64bc9&f=P1&v=2
@outloudvi
outloudvi / ipdiff.sh
Created September 28, 2018 06:52
A tiny shell script to check a domain with many server...
#!/bin/sh
echo "IPDiff >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
echo "Checking domain $1..."
echo "DNSCrypt : `dig @127.0.0.53 $1 +short | tr -t '\n' ' '`"
echo ">>>>>>>>>>> MAINLAND >>>>>>>>>>>>>>>>>>>>>>>>>>>"
echo "114DNS : `dig @114.114.114.114 $1 +short | tr -t '\n' ' '`"
echo "CNNIC SDNS : `dig @1.2.4.8 $1 +short | tr -t '\n' ' '`"
# echo "DNSPod DNS+ : `dig @119.29.29.29 $1 +short | tr -t '\n' ' '`"
echo "BaiduDNS : `dig @180.76.76.76 $1 +short | tr -t '\n' ' '`"
// ==UserScript==
// @name 1001TL:网易云 & 腾讯音乐搜索
// @namespace im.outv.1001tl.customsearch
// @version 1.0
// @description 将网易云与腾讯音乐的搜索链接加入 1001tracklists 的搜索区域。
// @author Outvi V
// @license MIT
// @match https://www.1001tracklists.com/tracklist/*
// @grant none
// ==/UserScript==
@outloudvi
outloudvi / pyCurrying.py
Created January 25, 2019 11:07
Python currying helper.
# Author : Outvi V
# License: MIT
class CurryingBase():
"""
This is a class that helps you to do with something called 'currying'.
Initially you need to give it two functions.
One is the final 'firing' function and another is the 'kick' function checking the dependencies.
"""
@outloudvi
outloudvi / wdd.py
Created February 22, 2019 01:13
A wrapper for wudao-dict with the enhancement of notify-send.
#!/usr/bin/env python3
# You may want to link it to /usr/bin then KDE can use it.
import re
from subprocess import run, check_output, DEVNULL
import sys
ansi_escape = re.compile(r'\x1B\[[0-?]*[ -/]*[@-~]')
result = check_output(
-----BEGIN PGP MESSAGE-----
owGbwMvMwCXWGty0+mPqmkLGNZOTmI0MDGImfD6lUVySkpmnaatgYZBmbGZpbJJo
bm5mYG5snpqaYmqSYpJiZmphamZsmmyYmGZilGaSZGmYYmaenJSYlmxqlmKRbGFi
kJialpqSlJyUnGZqZGRhbGxolmpinpaWnJhinpQElDU3NzU1NjIxNjc3NAcam2Sa
YpSYamppkGxpmmZgkGZiaGyYnJTE1VHKwiDGxSArpshituYES8xBEcX2l4vvwxzN
ygRyLgMXpwBM5IUTwz+tb8k/BV8c3MNh/nje7z6NbsG/nIwVU/a2/GeoK1HPv7eN
4X9hjvLffy+XnrHuvv0vPZAlxfVtzObPafYiIW/fTfq5cQ0LAA==
=J4Gi
-----END PGP MESSAGE-----
@outloudvi
outloudvi / Dockerfile
Created April 28, 2019 14:45
A simple Firefox sandbox with Docker.
FROM ubuntu:19.04
RUN sed -i 's/archive.ubuntu.com/mirrors.tuna.tsinghua.edu.cn/g' /etc/apt/sources.list && \ # Optional
sed -i 's/security.ubuntu.com/mirrors.tuna.tsinghua.edu.cn/g' /etc/apt/sources.list && \ # Optional
apt-get update && apt-get install -y firefox fonts-noto-cjk && \
useradd -m developer
USER developer
ENV HOME /home/developer
CMD /usr/bin/firefox -ProfileManager
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
I'm Outvi V (GPG:0xE14A40B70A930B8B).
I hereby state that, the following devices and keys are used by me in Riot.im:
Device ID / Device key
ZKUNPSNHIA / db/R kFcd gTFA GVBH mTmZ j0RM Kt3c Uu3m r1PY MpYu Rho