Skip to content

Instantly share code, notes, and snippets.

Avatar
🤕
afk

rocka

🤕
afk
View GitHub Profile
@rocka
rocka / twitter_remove_t_co.js
Created Oct 15, 2019
replace t.co with original links
View twitter_remove_t_co.js
// ==UserScript==
// @name Twitter remove t.co
// @description replace t.co with original links
// @match https://twitter.com/*
// @version 0.1
// ==/UserScript==
const PRIMARY_COLUMN = '[data-testid="primaryColumn"]';
const A_HREF_T_CO = 'a[href^="https://t.co"]';
@rocka
rocka / docker-update.sh
Last active Aug 4, 2019
Update all docker-compose projects to latest image
View docker-update.sh
#!/bin/bash
msg() {
# green
echo -e "\e[32m==>\e[0m" "\e[1m$@\e[0m"
}
msg2() {
# blue
echo -e "\e[34m ->\e[0m" "\e[1m$@\e[0m"
@rocka
rocka / tango.minttyrc
Created Dec 14, 2018
mintty "Tango" color scheme
View tango.minttyrc
Black=0,0,0
BoldBlack=64,64,64
Red=204,0,0
BoldRed=239,41,41
Green=78,154,6
BoldGreen=138,226,52
Yellow=196,160,0
BoldYellow=252,233,79
Blue=52,101,164
BoldBlue=114,159,207
@rocka
rocka / material_triangle.svg
Last active Jul 17, 2018
Maybe a "Material" background image
View material_triangle.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rocka
rocka / UserStyles
Last active Dec 18, 2018
UserSytles for Stylus/Stylish
View UserStyles
UserSytles for Stylus/Stylish
@rocka
rocka / docker_helper.fish
Last active Jun 30, 2019
docker helper functions for fish shell
View docker_helper.fish
# Docker helper functions for fish shell
function docker-update --description 'pull all :latest images'
docker images --format '{{.Repository}}:{{.Tag}}' | egrep ':(latest|alpine)' | xargs -L1 docker pull
end
function docker-clean --description 'remove all none-taged images'
docker rmi (docker images | grep '<none>' | awk '{print $3}')
end
@rocka
rocka / arch_init.sh
Last active Jul 15, 2019
Arch Linux VPS initialize script
View arch_init.sh
#!/bin/bash
USERNAME='rocka'
HOSTNAME='arch'
SS_PORTNO='1234'
SS_METHOD='aes-256-gcm'
SS_PASSWD='all-your-base-are-belong-to-us'
# pacman related config
sed -i 's/#Color/Color/g' /etc/pacman.conf
@rocka
rocka / NeteaseWatchmanToken.html
Created Jun 5, 2017
try to generate login token for `music.163.com`
View NeteaseWatchmanToken.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<script pro-data="9cc38396948a8f869494ac869ac3dbc38385d3d88685d8d4d686da83d584d1d3dad5d9d1d4dad6d9da87d8d1d1d4d984c3cdc394b6938dc3dbc38995959194dbd0d08284cf85968fcfd2d7d49a968fcf84908edbd5d5d4d097d2d085c3cdc385b6938dc3dbc38995959194dbd0d08284cf85968fcfd2d7d49a968fcf84908edbd5d5d4d097d2d083c3cdc3848594c3dbbcc3cf8c82908d82cf84908ec3cdc3cf8c82908d82cf84908ecf898cc3cd8f968d8dcdc3cfd2d7d4cf84908ec3cdc3cf8f869586829486cf84908ec3becdc3879590c3dbd1cdc385b09195c3db9cc38e8e8ec3dbd2d6d1cdc38e8e8ac3dbd4d1d1cdc38e8e85c3dbd4d1cdc38e858ac3dbd4d1d1cdc38e958ec3dbd2d6d1cdc3958e8ac3dbd4d1d1cdc38e8c85c3dbd7cdc38c858ac3dbd4d1d1cdc38e87c3dbd3d1cdc3878ac3dbd4d1d1cdc38e8790c3dbd3d1cdc387908ac3dbd4d1d1cdc38e8490c3dbd3d1cdc384908ac3dbd4d1d1cdc38394c3dbd6d1d19ecdc394b09195c3db9cc38a8b9487c3db87828d9486cdc38a8787c3db95939686cdc38a98888dc3db95939686cdc394848ac3dbc3c0949887c0d9d89985d4998599b1908a99dad9d499a5ad91909985c3cdc39496c3dbc38995959194dbd
@rocka
rocka / keybase.md
Last active Apr 19, 2018
keybase.io
View keybase.md

Keybase proof

I hereby claim:

  • I am rocka on github.
  • I am rocka (https://keybase.io/rocka) on keybase.
  • I have a public key whose fingerprint is 9FF7 402F 7DB8 F72A 8134 B130 2803 1158 FFDD 6853

To claim this, I am signing this object:

You can’t perform that action at this time.