Skip to content

Instantly share code, notes, and snippets.

@pastleo
pastleo / README.md
Last active February 14, 2018 10:04
kkbox-player-full-screen css overwrite

kkbox-player-full-screen css overwrite

this make the kkbox web player full screen with lyrics

How to use?

  1. install stylus first: https://add0n.com/stylus.html
  2. head to Stylus manage page, click Write new style
  3. Click import, and choose kkbox-player-full-screen.css
@pastleo
pastleo / nm_l2tp_ipsec_vpn.md
Last active November 10, 2025 07:53
setup L2TP IPSEC VPN in archlinux using NetworkManager
@pastleo
pastleo / use_utc_time_x86.reg
Created February 4, 2018 09:05
use utc on windows
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation]
"RealTimeIsUniversal"=dword:00000001
@pastleo
pastleo / test.jsx
Last active January 18, 2018 14:38 — forked from midorisakai/test.jsx
class Price extends React.Component {
constructor(props) {
super(props)
this.termId = 0
this.facultyId = 0
this.bstOptions = {
onAddRow: (row) => this._onAddRow(row),
afterDeleteRow: (rowKeys) => this._afterDeleteRow(rowKeys)
}
this.bstSelectRow = {
@pastleo
pastleo / docker-compose.yml
Created November 9, 2017 16:48
openvpn docker compose with howto
version: '3.2'
volumes:
data:
driver: local
services:
openvpn:
cap_add:
- NET_ADMIN
image: kylemanna/openvpn
container_name: openvpn
@pastleo
pastleo / gdfuse-mount.sh
Created July 30, 2017 06:35
google-drive-ocamlfuse mount and check script
#!/bin/bash
# Usage: path/to/this/script.sh [label]
# For crontab that checks every 10 minutes:
# */10 * * * * path/to/this/script.sh [label]
if [ -z "$1" ]; then
label="default"
else
label=$1
@pastleo
pastleo / docker-compose.yml
Created April 10, 2017 05:35
docker-compose.yml for php7 built-in server
version: '3.1'
services:
server:
image: php:7
working_dir: /var/www/html
ports:
- 8002:8002
volumes:
- .:/var/www/html
command: php -S 0.0.0.0:8002
#!/bin/bash
echo $1
echo $@
echo $#
echo 'the end'
@pastleo
pastleo / Dockerfile
Last active August 16, 2016 16:37
COSCUP 2016 Git-it on Docker Workshop: 我的 Dockerfile
FROM ubuntu:14.04
RUN \
apt-get update -qq && \
apt-get install -y git nodejs npm vim nano openssh-server rsyslog curl && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN ln -s /usr/bin/nodejs /usr/bin/node
RUN npm install -g git-it
@pastleo
pastleo / ring.sh
Last active July 24, 2016 04:36
讓你的主機板狂叫,對了這個需要 root 權限
#!/bin/bash
for i in {1..60}; do
echo -en "\a" > /dev/tty5
sleep 0.5
done