Skip to content

Instantly share code, notes, and snippets.

View akatrevorjay's full-sized avatar
🌙

Trevor Joynson akatrevorjay

🌙
View GitHub Profile
@wuzhez
wuzhez / ubuntu-MBP-16.md
Created May 14, 2020 06:19 — forked from gbrow004/ubuntu-MBP-16.md
Ubuntu on Apple Macbook Pro 16-inch (2019)

Acknowledgements

This gist is just a compilation of the hard work that others have put in. I'm not a software developer, so if there are any mistakes or better ways of doing things, I'd appreciate any suggestions. Here's a list of the real heroes who made this possible:

Kernel Patches: aunali (https://github.com/aunali1/)

T2 security chip bypass to allow access to the SSD, keyboard, and trackpad: MCMrARM (https://github.com/MCMrARM)

Audio: kevineinarsson

@michelp
michelp / postgrest-quick.sh
Last active April 13, 2022 21:42
From nothing to REST API with PostgREST
# Minimal example of getting a PostgREST API running from scratch for
# testing purposes. It uses docker to launch a postgres database and
# a postgrest api server.
# This should not be used to deploy a production system but to
# understand how postgrest works. In particular there is no security
# implemented, see the docs for more.
# https://postgrest.org/en/v4.4/
@JZersche
JZersche / : userChrome.css (zDark) Firefox Theme
Last active February 2, 2019 18:13
The chrome directory and userChrome.css file does not exist by default. It will need to be created.
[Firefox 57.0b11->65.0b12 Developer Edition]
Tab Center Redux 0.5.1 zDark Modern Theme
/* Place the Code below inside the chrome folder in a file named userChrome.css */
[%APPDATA%\Mozilla\Firefox\Profiles\[YourProfileID].dev-edition-default\chrome\userChrome.css */
@namespace http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul;// userChrome.css JZersche //
#navigator-toolbox{margin-top:1px}#TabsToolbar{visibility:collapse!important}#main-window{--toolbar-bgcolor:#282C30!important}#urlbar{background:#1f2226;border:1px solid #33383c}#pageAction-urlbar-reload-in-urlbar_exe-boss{filter:invert(100%)}#sidebar-box[sidebarcommand="_0ad88674-2b41-4cfb-99e3-e206c74a0076_-sidebar-action"]{overflow:hidden!important;min-width:32px!important;max-width:32px!important;position:relative!important;top:89px!important;transition:all .2s ease!important;border-right:2px solid #0088eeff!important;z-index:2!important}#sidebar-box[sidebarcommand="_0ad88674-2b41-4cfb-99e3-e206c74a0076_-sidebar-action"] #sidebar{position:
@akatrevorjay
akatrevorjay / loc
Last active May 19, 2024 01:31
loc: mlocate + fzf integration
#!/usr/bin/env zsh
#
# loc: mlocate + fzf integration
#
# https://gist.github.com/06dc1238b2fcbfb6c10bbad05ad79bc1
# https://asciinema.org/a/102006
#
# ~ trevorj <github@trevor.joynson.io>
#
setopt pipe_fail err_return err_exit
@akatrevorjay
akatrevorjay / git-fshow
Last active May 19, 2024 01:39 — forked from junegunn/gist:f4fca918e937e6bf5bad
Browsing git commit history with fzf
#!/bin/zsh
# git-fshow - git commit browser
#
# https://gist.github.com/akatrevorjay/9fc061e8371529c4007689a696d33c62
# https://asciinema.org/a/101366
#
git-fshow() {
local g=(
git log
#!/usr/bin/env python3
# Author: Serg Kolo
# Date: Oct 3rd, 2016
# Description: Script for aligning the center of
# user's active window with the center of the monitor
# Tested on: Ubuntu 16.04
from __future__ import print_function
from gi.repository import Gdk,Gio
@rcarmo
rcarmo / thespian-raft.py
Created August 7, 2016 08:17
The Raft leader election protocol, implemented atop GoDaddy's Thespian actor library
from thespian.actors import *
from datetime import datetime, timedelta
from logging import getLogger, basicConfig, DEBUG
from random import randint
basicConfig(level=DEBUG)
log = getLogger(__name__)
class Postman(Actor):
@akatrevorjay
akatrevorjay / setuptools_parse_all_requirements.py
Last active February 12, 2020 19:25
Parse a glob of requirements file(s) to fill in your requirements for you, or just as a generic parser.
import glob
import itertools
import os
# This is getting ridiculous
try:
from pip._internal.req import parse_requirements
from pip._internal.network.session import PipSession
except ImportError:
try:
@campaul
campaul / tarnish.rs
Created December 11, 2015 01:52
Simple HTTP proxy in Rust.
/*
Simple HTTP proxy in Rust. Hard coded to proxy rust-lang.org.
*/
extern crate hyper;
use std::io::Read;
use hyper::Client;
use hyper::header::Connection;
import asyncio
import functools
import random
class Message(object):
def __init__(self, message, payload={}):
self.message = message
self.payload = payload
self.result = None