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);
@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
@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
@upzone
upzone / cmdline-publish
Created December 29, 2018 17:54 — forked from tdavisjr/cmdline-publish
msbuild command line publish
VS2012+ have these featured built in
msbuild ProjectFile.csproj /p:Configuration=Release ^
/p:Platform=AnyCPU ^
/t:WebPublish ^
/p:WebPublishMethod=FileSystem ^
/p:DeleteExistingFiles=True ^
/p:publishUrl=c:\output
Or if you are building the solution file:

Install x264

cd ~
git clone git://git.videolan.org/x264
cd x264
./configure --host=arm-unknown-linux-gnueabi --enable-static --disable-opencl
make -j4
sudo make install
@upzone
upzone / SPOUpload-Files.ps1
Created December 12, 2017 04:44 — forked from vgrem/SPOUpload-Files.ps1
Upload files into Document Library in SharePoint Online
Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.dll"
Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.Runtime.dll"
Function Ensure-Folder()
{
Param(
[Parameter(Mandatory=$True)]
[Microsoft.SharePoint.Client.Web]$Web,