Skip to content

Instantly share code, notes, and snippets.

@pastleo
pastleo / nm_l2tp_ipsec_vpn.md
Last active May 4, 2024 01:12
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
@pastleo
pastleo / GA-H170N-WIFI_NV970_DebianJessie.md
Last active March 9, 2018 22:16
Install drivers (firmware) for debian 8 (jessie) on GA-H170N-WIFI with Nvidia GTX970

Install drivers (firmware) for debian 8 (jessie) on GA-H170N-WIFI with Nvidia GTX970

After installing debian 8 (jessie) on my GA-H170N-WIFI with Nvidia GTX970, there are many hardwares not working properly. After digging for some time, I finally get everything working. So I am going to write this simple note to help people might need this in the future (for me as well).

Today is 2016/6/25, many things may be fixed in the future

Things not working properly after installation:

  • Audio chip Realtec ALC1150 built on GA-H170-WIFI