Skip to content

Instantly share code, notes, and snippets.

View DravenJohnson's full-sized avatar

Draven Johnson DravenJohnson

View GitHub Profile
@daemonp
daemonp / encrypted-root-arch-linux-pixelbook.md
Last active May 2, 2024 16:01
Installing Arch Linux on a Google Pixelbook (i7 16gb 500gb NVMe)

Overview

Stable enough for my initial use-case, light-duty laptop for travel and presentations, running Linux all the time but retain a small ChromeOS volume for firmware updates and restoring settings.

1st attempt I wiped the drive and then found that when the machine attempted to suspect when the lid closed it wiped the NVRAM with no other option to boot into legacy mode than to restore ChromeOS and enable it again.

  • Setup base system in ChromeOS
  • Fully encrypted Btrfs root partition & ext4 boot
  • Install Arch Linux
@alibo
alibo / 01-filternet-top200k-26-03-2016.csv
Last active March 1, 2024 20:05
State of Alexa Top 200K global sites in Iran [Censorship] [26-03-2016] #filternet
Rank Site SNI HTTP DNS
1 google.com open open open
2 youtube.com blocked blocked blocked
3 facebook.com blocked blocked blocked
4 baidu.com open open open
5 yahoo.com open open open
6 amazon.com open open open
7 wikipedia.org open open open
8 qq.com open open open
9 google.co.in open open open
// Sample event data for a proxy request
// {
// "resource": "Resource path",
// "path": "Path parameter",
// "httpMethod": "Incoming request's method name"
// "headers": {Incoming request headers}
// "queryStringParameters": {query string parameters }
// "pathParameters": {path parameters}
// "stageVariables": {Applicable stage variables}
// "requestContext": {Request context, including authorizer-returned key-value pairs}
@gaoyifan
gaoyifan / google-fonts-proxy
Last active November 10, 2022 10:02
google-fonts-proxy
server {
listen 80;
listen 443;
listen [::]:80;
listen [::]:443;
server_name fonts.lug.ustc.edu.cn;
access_log /var/log/nginx/revproxy_access.log;
error_log /var/log/nginx/revproxy_error.log;
ProductID Database
106 GeoIP.dat
111 GeoIPOrg.dat
112/115 GeoIPRegion.dat
117 GeoIPASNum.dat
119 GeoIPUserType.dat
121/122 GeoIPISP.dat
132/133 GeoIPCity.dat
135 GeoIPAreaCode.dat
137 GeoIPDMACode.dat
@mbbx6spp
mbbx6spp / ALTERNATIVES.adoc
Last active April 25, 2024 15:14
Super quick list of alternatives to Jira and/or Confluence, Stash, Crucible, etc.
@adam-p
adam-p / Local PR test and merge.md
Last active February 5, 2024 19:39
Testing a pull request, then merging locally; and avoiding TOCTOU

It's not immediately obvious how to pull down the code for a PR and test it locally. But it's pretty easy. (This assumes you have a remote for the main repo named upstream.)

Getting the PR code

  1. Make note of the PR number. For example, Rod's latest is PR #37: Psiphon-Labs/psiphon-tunnel-core#37

  2. Fetch the PR's pseudo-branch (or bookmark or rev pointer whatever the word is), and give it a local branch name. Here we'll name it pr37:

$ git fetch upstream pull/37/head:pr37
@dmitshur
dmitshur / gist:6927554
Last active September 17, 2023 07:35
[Legacy GOPATH mode] How to `go get` private repos using SSH key auth instead of password auth.

WARNING: This gist was created in 2013 and targets the legacy GOPATH mode. If you're reading this in 2021 or later, you're likely better served by reading https://tip.golang.org/cmd/go/#hdr-Configuration_for_downloading_non_public_code and https://golang.org/ref/mod#private-modules.

$ ssh -A vm
$ git config --global url."git@github.com:".insteadOf "https://github.com/"
$ cat ~/.gitconfig
[url "git@github.com:"]
	insteadOf = https://github.com/
$ go get github.com/private/repo && echo Success!
Success!