Skip to content

Instantly share code, notes, and snippets.

View frantic1048's full-sized avatar
🐇

Jiahao Guo frantic1048

🐇
View GitHub Profile
@frantic1048
frantic1048 / aur_dep_indicator.user.css
Created December 1, 2017 04:02
AUR dep indicator
#pkgdepslist a[href^="/packages/"]::after {
display: inline-block;
margin-left: 0.4em;
margin-right: 0.2em;
line-height: 1;
vertical-align: top;
font-size: 0.6em;
color: #333;
content: "AUR";
}
@frantic1048
frantic1048 / glowing-bear-style.css
Created March 16, 2017 10:41
Stylished glowing bear stylesheet
.content {
height: 100%;
min-height: 100%;
background-image: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.4)), url("http://localhost/images/yande.re 346501.png");
background-color: white;
background-size: cover;
background-repeat: no-repeat;
background-position: center center;
}
@frantic1048
frantic1048 / keybase.md
Created January 16, 2017 14:39
keybase.md

Keybase proof

I hereby claim:

  • I am frantic1048 on github.
  • I am frantic1048 (https://keybase.io/frantic1048) on keybase.
  • I have a public key whose fingerprint is D2DE 8CCA 1E74 D572 369F 4C69 9207 632B D48B DDAA

To claim this, I am signing this object:

@frantic1048
frantic1048 / loi.js
Last active December 1, 2016 08:55
Exract video frames with subtitle according to a .ass subtitle
#!/usr/bin/env node
/**
* loi.js
*
* Extract video frames with subtitle according to .ass subtitle file.
*
* usage:
* loi.js VIDEO_FILE SUBTITLE_FILE
*
@frantic1048
frantic1048 / nvidia-gpu-sensor.pl
Last active October 12, 2020 10:18
KDE KSysGuard NVIDIA GPU temperature/memory/utilization sensor
#!/usr/bin/perl -w
# act as a KSysGuard sensor
# provides NVIDIA GPU info via `nvidia-settings`
# Usage (e.g. add gpu temperature sensor)
# 1. save this file, make sure it has a exec permission
# 2. in KSysGuard's menu, open `File` -> `Monitor Remote Machine`
# 3.1 in new dialog, type `Host` whatever you want
# 3.2 set `Connection Type` to `Custom command`
@frantic1048
frantic1048 / waifu.sh
Last active September 25, 2018 02:08
waifu2x batch operation wrapper
#!/bin/bash
waifu () {
if [[ $# -eq 0 ]]; then
cat << EOF
Usage: waifu [OPTIONS] FILE1 [FILE2 ...]
Options:
-d dry run, just print out the commands to exec.
@frantic1048
frantic1048 / PKGBUILD
Last active April 29, 2016 18:29
Arch Linux patched linux kernel for Bug 1317116 - System freeze when Wacom One Tablet (CTL-471) is attached
# $Id: PKGBUILD 265148 2016-04-19 06:55:26Z tpowa $
# Maintainer: Tobias Powalowski <tpowa@archlinux.org>
# Maintainer: Thomas Baechler <thomas@archlinux.org>
#pkgbase=linux # Build stock -ARCH kernel
pkgbase=linux-Kafuu # Build kernel with a different name
_srcname=linux-4.5
pkgver=4.5.1
pkgrel=1
arch=('i686' 'x86_64')
@frantic1048
frantic1048 / restyle_tree_style_tab.user.css
Created November 27, 2015 12:09
A stylish style restyling awesome Tree Style Tab addon on Firefox, e.g. adding a background image XD
/* author:
* frantic1048 (https://github.com/frantic1048)
* description:
* a simple stylish style costmizing key style of Tree Style Tab addon for Firefox
* Tree Style Tab: https://addons.mozilla.org/en-US/firefox/addon/tree-style-tab/
* usage:
* create a blank stylish style, paste this file into editor, click save ~
* comment:
* modify the rules to fit your flavor :P
*/
@frantic1048
frantic1048 / getImageDataFromInput.js
Last active December 7, 2015 12:37
get ImageData(pixel information) directly from HTML Input Element
/* use on <input> like this, multiple is optional.
* <input
* type="file"
* multiple
* accept="image/*"
* onchange={handleFile}
* />
*/
function handleFile() {
function extractDataAndDoSomething(f) {
@frantic1048
frantic1048 / stackedit-backgroundimage.user.css
Last active November 12, 2015 07:15
StackEdit.io with background image
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document domain("stackedit.io") {
/* set page background image
* adjust these rules to your flavor :)
*/
body{
background-color:white;
background-image:url('<path to your background image>');
background-repeat: no-repeat;