Skip to content

Instantly share code, notes, and snippets.

((document, limit) => {
const data = Array.from(document.querySelectorAll('*'))
.map((el) => ({zIndex: Number(getComputedStyle(el).zIndex), element: el }))
.filter(({ zIndex }) => !isNaN(zIndex))
.sort((r1, r2) => r2.zIndex - r1.zIndex)
.slice(0, limit);
console.table(data);
})(document, 50);
# 安装ntfs-3g模块
sudo apt-get install ntfs-3g -y
# 更新内核模块
sudo moprobe fuse
# 重启
sudo reboot
@upzone
upzone / curl.md
Created March 26, 2019 04:21 — forked from btoone/curl.md
A curl tutorial using GitHub's API

Introduction

An introduction to curl using GitHub's API.

The Basics

Makes a basic GET request to the specifed URI

curl https://api.github.com/users/caspyin
@upzone
upzone / make_github_issue.py
Created March 26, 2019 04:19 — forked from JeffPaine/make_github_issue.py
Make an issue on github using API V3 and Python
import json
import requests
# Authentication for user filing issue (must have read/write access to
# repository to add issue to)
USERNAME = 'CHANGEME'
PASSWORD = 'CHANGEME'
# The repository to add this issue to
REPO_OWNER = 'CHANGEME'
@upzone
upzone / README.md
Created March 8, 2019 14:20 — forked from hofmannsven/README.md
My simply Raspberry Pi Cheatsheet
Raspbian change swap size
Raspberry PI - increase swap size
Stop the swap. sudo dphys-swapfile swapoff.
Modify the size of the swap. As root , edit the file /etc/dphys-swapfile and modify the variable CONF_SWAPSIZE : CONF_SWAPSIZE=1024. ...
Start the swap. sudo dphys-swapfile swapon.
@upzone
upzone / 如何解决树莓派安装openvpn clientu不能访问google的问题.md
Last active January 25, 2019 20:05
如何解决树莓派安装openvpn clientu不能访问google的问题

在.ovpn或.conf文件末尾加上以下配置

script-security 2
up /etc/openvpn/update-resolv-conf
down /etc/openvpn/update-resolv-conf

完成后使用 openvpn ./client1.conf 重新连接openvpn

@upzone
upzone / gist:e7ed0bbcdddb1163f7df076097be63eb
Created January 15, 2019 05:14
jenkins pipeline git scm checkout to relative directory
checkout([$class: 'GitSCM',
branches: [[name: '*/master']],
userRemoteConfigs: [[url: 'https://<token>@<bbgithub_git_url>']],
extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: 'tp-fdm-monitor-bcl']]
])
@upzone
upzone / tmux-cheatsheet.md
Created January 12, 2019 15:12 — forked from lanycrost/tmux-cheat-sheet.md
tmux shortcuts & cheatsheet

shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s session_name
@upzone
upzone / install-unrar-nonfree-raspbian.sh
Created January 9, 2019 03:47 — forked from VadimBrodsky/install-unrar-nonfree-raspbian.sh
Get Unrar Nonfree on Raspbian for the Raspberry PI
# As per this guide -- http://raspberrypi.stackexchange.com/questions/3617/how-to-install-unrar-nonfree#3618
# Uninstall unrar-free.
sudo apt-get remove unrar-free
# Make sure you have a source repository by editing /etc/apt/sources.list.
cat /etc/apt/sources.list
# Sync the apt database.
sudo apt-get update