This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name punycode url highlight | |
// @include * | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
var url= window.location.href; | |
if (url.indexOf("xn--") != -1) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name auto-copy | |
// @include * | |
// @grant GM_setClipboard | |
// ==/UserScript== | |
function getSelectedText() { | |
// console.log(getSelection().anchorNode.nodeName); | |
if (window.getSelection().anchorNode.nodeName== "#text") { | |
return window.getSelection().toString(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import sys | |
import requests | |
from bs4 import BeautifulSoup | |
if(len(sys.argv) < 2): | |
sys.exit(1) | |
r = requests.get('http://dict.cn/' + sys.argv[1]) | |
r.encoding = 'utf-8' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
root=$1 | |
dir="$root/android/src/main/" | |
xml="$dir/res/xml/network_security_config.xml" | |
manifest="$dir/AndroidManifest.xml" | |
tmpfile="$manifest.tmp" | |
if [ ! -e $manifest ]; then | |
echo "File $manifest doesn't exist!" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install ARCH Linux | |
# The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description. | |
# Download the archiso image from https://www.archlinux.org/download/ | |
# Make USB flash installation media https://wiki.archlinux.org/index.php/USB_flash_installation_media | |
dd bs=4M if=/path/to/archlinux.iso of=/dev/sdX status=progress && sync | |
# Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration. | |
# This assumes a wifi only system... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* How/Where to edit userChrome.css https://i.redd.it/v7lkiqannojz.png */ | |
@-moz-document url("chrome://browser/content/browser.xul") { | |
/* hide navigation bar */ | |
#nav-bar { | |
display: none; | |
} | |
/* hover the bottom of tab bar to show navigation bar */ | |
#navigator-toolbox:hover > #nav-bar{ | |
display: -moz-box; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# TRY THIS ON YOUR OWN RISK! | |
# root needed | |
BLOAT_APP_LIST=( | |
YouTube | |
Videos | |
Photos | |
Drive | |
Duo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<resources> | |
<string name="app_name">Resplash</string> | |
<string name="navigation_drawer_open">打开导航抽屉</string> | |
<string name="navigation_drawer_close">关闭导航抽屉</string> | |
<string name="action_share">分享</string> | |
<string name="action_view_on_unsplash">在浏览器中打开</string> | |
<!-- ErrorView --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"short_name": "Kevin", | |
"name": "Krazy Kevin", | |
"icons": [ | |
{ | |
"src":"/images/favicons/android-icon-192x192.png", | |
"sizes": "192x192", | |
"type": "image/png" | |
} | |
], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
self.addEventListener('install', e => { | |
let timeStamp = Date.now(); | |
e.waitUntil( | |
caches.open('kevin-blog').then(cache => { | |
return cache.addAll([ | |
`/`, | |
`/#blog`, | |
`/css/uno.min.css`, | |
`/css/font.min.css`, | |
`/css/resume.min.css`, |
OlderNewer