Skip to content

Instantly share code, notes, and snippets.

View bdekoz's full-sized avatar

Benjamin De Kosnik bdekoz

View GitHub Profile
@jimporter
jimporter / fenix-startup
Last active March 4, 2020 21:31
Get startup "fully drawn" numbers for several Fenix runs
#!/usr/bin/env python3
import argparse
import json
import re
import statistics
import subprocess
import sys
import textwrap
import time
@djmitche
djmitche / mozilla-levels.md
Last active July 15, 2024 22:57
Mozilla Levels

[UPDATE July 2024]

New year, new links:

I don't work at Mozilla any longer, but I'm happy to keep this up-to-date. Please reach out (same username on gmail) with any updates!

[UPDATE June 2020]

@grenade
grenade / install-watchman.sh
Last active June 17, 2020 10:08 — forked from davidmason/install-watchman.bash
To install watchman on Fedora 28, these are all the hoops I had to jump through.
# The following packages are needed during `make`
# - openssl-devel so you don't get:
# ContentHash.cpp:13:10: fatal error: openssl/sha.h: No such file or directory
# - redhat-rpm-config so you don't get:
# gcc: error: /usr/lib/rpm/redhat/redhat-hardened-cc1: No such file or directory
# - python-devel so you don't get:
# pywatchman/bser.c:31:10: fatal error: Python.h: No such file or directory
sudo dnf install openssl-devel redhat-rpm-config python-devel libtool
# The rest is just instructions from
@thehans
thehans / alternative_spheres.scad
Last active March 6, 2022 04:02
Alternative sphere implementations in OpenSCAD userspace
translate([-30,0,0]) poly3d(sphere(r=9,$fn=80));
translate([-10,0,0]) poly3d(normalized_cube(r=9,div_count=20));
translate([10,0,0]) poly3d(spherified_cube(9,div_count=20));
translate([30,0,0]) poly3d(icosahedron(9,n=4));
module poly3d(p) {
polyhedron(points=p[0],faces=p[1]);
}
function normalize(v) = v / norm(v); // convert vector to unit vector
@roadrunner2
roadrunner2 / 0 Linux-On-MBP-Late-2016.md
Last active July 26, 2024 23:34
Linux on MacBook Pro Late 2016 and Mid 2017 (with Touchbar)

Introduction

This is about documenting getting Linux running on the late 2016 and mid 2017 MPB's; the focus is mostly on the MacBookPro13,3 and MacBookPro14,3 (15inch models), but I try to make it relevant and provide information for MacBookPro13,1, MacBookPro13,2, MacBookPro14,1, and MacBookPro14,2 (13inch models) too. I'm currently using Fedora 27, but most the things should be valid for other recent distros even if the details differ. The kernel version is 4.14.x (after latest update).

The state of linux on the MBP (with particular focus on MacBookPro13,2) is also being tracked on https://github.com/Dunedan/mbp-2016-linux . And for Ubuntu users there are a couple tutorials (here and here) focused on that distro and the MacBook.

Note: For those who have followed these instructions ealier, and in particular for those who have had problems with the custom DSDT, modifying the DSDT is not necessary anymore - se

@smits
smits / build_valgrind.sh
Last active June 7, 2020 06:45
Build and push valgrind for Android devices
#!/usr/bin/env bash
#set -x
function extract()
{
if [ -f "$1" ] ; then
case "$1" in
*.tar.bz2) tar xvjf "$1" ;;
*.tar.gz) tar xvzf "$1" ;;
@0XDE57
0XDE57 / config.md
Last active July 25, 2024 19:50
Firefox about:config privacy settings

ABOUT

about:config settings to harden the Firefox browser. Privacy and performance enhancements.
To change these settings type 'about:config' in the url bar. Then search the setting you would like to change and modify the value. Some settings may break certain websites from functioning and rendering normally. Some settings may also make firefox unstable. I am not liable for any damages/loss of data.

Not all these changes are necessary and will be dependent upon your usage and hardware. Do some research on settings if you don't understand what they do. These settings are best combined with your standard privacy extensions (HTTPS Everywhere No longer required: Enable HTTPS-Only Mode, NoScript/Request Policy, uBlock origin, agent spoofing, Privacy Badger etc), and all plugins set to "Ask To Activate".

@mcandre
mcandre / public-trackers.md
Last active February 11, 2024 09:18
List of public BitTorrent tracker announce URLs
@ccopsey
ccopsey / gist:9866a0bcb0b39ade04fe
Created January 3, 2015 20:00
Rename master branch on GitHub
git branch -m master newname
git push origin newname
# Change "Default Branch" in settings/options in GitHub
git push origin :master
@guifromrio
guifromrio / compress-pdf-with-gs.md
Created August 30, 2013 14:39
Compress PDF files with ghostscript

This can reduce files to ~15% of their size (2.3M to 345K, in one case) with no obvious degradation of quality.

ghostscript -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/printer -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf

Other options for PDFSETTINGS:

  • /screen selects low-resolution output similar to the Acrobat Distiller "Screen Optimized" setting.
  • /ebook selects medium-resolution output similar to the Acrobat Distiller "eBook" setting.
  • /printer selects output similar to the Acrobat Distiller "Print Optimized" setting.
  • /prepress selects output similar to Acrobat Distiller "Prepress Optimized" setting.