Skip to content

Instantly share code, notes, and snippets.

View zst123's full-sized avatar

zst123 zst123

View GitHub Profile
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Matrix;
import android.graphics.Paint;
import android.graphics.Path;
import android.graphics.RectF;
import android.util.AttributeSet;
import android.view.View;
import android.view.animation.AccelerateDecelerateInterpolator;
@zst123
zst123 / bookmarklet.js
Last active August 29, 2015 14:03 — forked from BrettBukowski/bookmarklet.js
Update: Add Background, make label and input detect playback speed and set accordingly
javascript:!function(a){function g(a,b){for(var c in b)b.hasOwnProperty(c)&&(a.style[c]=b[c])}var b=a.querySelector("video"),c=a.createElement("input"),d=a.createElement("label"),e=a.createElement("div"),f;d.innerHTML='<span class="asdf">1x</span>',g(d,{color:"#EEE",fontSize:"11px",background:"#1b1b1b"}),c.type="range",c.max=4,c.min=.25,c.value=1,c.step=.05,g(c,{left:"4px",width:"90%",verticalAlign:"middle",webkitAppearance:"slider-horizontal",mozAppearance:"slider-horizontal"}),d.appendChild(c),g(e,{width:"50%",padding:"3px",position:"absolute",zIndex:1e3}),e.appendChild(d),(f=a.querySelector(".html5-player-chrome"))?(f.appendChild(e),g(e,{left:"30%"})):b.parentNode.insertBefore(e,b),d.querySelector(".asdf").innerHTML=b.playbackRate+"x",c.value=b.playbackRate,c.addEventListener("change",function(a){var c=a.target.value;b.playbackRate=c,d.querySelector(".asdf").innerHTML=c+"x"})}(document);
javascript:!function(a){function g(a,b){for(var c in b)b.hasOwnProperty(c)&&(a.style[c]=b[c])}var b=a.querySelector("video"),c=a.createElement("input"),d=a.createElement("label"),e=a.createElement("div"),f;d.innerHTML='<span class="asdf">1x</span>',g(d,{color:"#EEE",fontSize:"11px",background:"transparent"}),h=document.getElementsByClassName("ytp-chrome-controls"),c.type="range",c.max=4,c.min=.25,c.value=1,c.step=.25,g(c,{left:"8px",width:"90%",verticalAlign:"middle",webkitAppearance:"slider-horizontal",mozAppearance:"slider-horizontal"}),d.appendChild(c),g(e,{top:"22%",width:"50%",padding:"4px",position:"absolute",zIndex:1e3}),e.appendChild(d),(f=a.querySelector(".ytp-chrome-bottom"))?(f.appendChild(e),g(e,{left:"25%"})):b.parentNode.insertBefore(e,b),d.querySelector(".asdf").innerHTML=b.playbackRate+"x",c.value=b.playbackRate,c.addEventListener("change",function(a){var c=a.target.value;b.playbackRate=c,d.querySelector(".asdf").innerHTML=c+"x"})}(document);
@zst123
zst123 / MSHSDarkLoginPage.css
Created November 22, 2015 02:18
Stylish Userstyle - MSHS Dark Login Page 10.10.1.1
.content * .Prompt {display: none !important; }
body { background: #303030 url('') repeat fixed center !important; }
* {
border-color: transparent !important;
font-family: Century Gothic !important;
font-size: 13px;
font-weight: bold;
font-align:center;
color: rgba(255,255,255,.8) !important;
/* Captions Styling */
span.captions-text * {
font-family: "Helvetica Neue", "Yuanti SC", "Yuanti TC", "LiHei Pro" !important;
color: #fff !important;
background-color: rgba(0, 0, 0, 0) !important;
text-shadow: -3px 0 3px black, 0 3px 3px black, 3px 0 3px black, 0 -3px 3px black !important;
padding-top: -16px;
}
/* Widen Caption */

Keybase proof

I hereby claim:

  • I am zst123 on github.
  • I am zst123 (https://keybase.io/zst123) on keybase.
  • I have a public key whose fingerprint is 8A8A 85BC 7CEA 9C31 8045 18FF BE23 79CE 3D18 A071

To claim this, I am signing this object:

#!/usr/bin/env python
import sys
import os
class CmdColors:
ATTR_OFF = '\033[0m'
DEFAULT = '\033[99m'
BOLD = '\033[1m'
UNDERLINE = '\033[4m'
# Colors
@zst123
zst123 / 3way-xor.py
Created July 12, 2017 15:21
Python script for 3 way XOR (aka. one and only one)
#!/usr/bin/env python
import binascii
import sys
# PARITY_MODE = True # for odd number detection
PARITY_MODE = False # for 1 and only 1
def xor(numb_list):
final = ""
@zst123
zst123 / setup-xquartz-docker.sh
Created October 29, 2017 13:56
Setup XQuartz on Mac to run Docker GUI apps.
# References:
# http://sourabhbajaj.com/blog/2017/02/07/gui-applications-docker-mac/
# https://forums.docker.com/t/how-to-run-gui-apps-in-containiers-in-osx-docker-for-mac/17797/21
# https://fredrikaverpil.github.io/2016/07/31/docker-for-mac-and-gui-applications/
# Install XQuartz
brew cask install xquartz
# Allow network connections
defaults write org.macosforge.xquartz.X11 nolisten_tcp 0
# Don't launch terminal when starting XQuartz
@zst123
zst123 / prima_programma.pl
Last active May 1, 2020 14:58
Mea prima programma in Lingua::Romana::Perligata. My first program using Lingua::Romana::Perligata.
#!/usr/bin/env perl
use Lingua::Romana::Perligata
# 'converte',
# 'discribe'
# 'investiga',
;
adnota =========================================================
adnota #[EN] This is my first program.
adnota #[LA] haec est mea prima programma.