Skip to content

Instantly share code, notes, and snippets.

@mntmn
mntmn / mbp_retina_trackpad.md
Created November 10, 2013 19:02
Good setup for MacBook Pro Retina 13" trackpad in Linux/Xorg/X11 (Debian jessie for me). Handles resting thumb and thumb-click-indefinger-drag correctly. Also fixes jerk/jump on very small movements that ought to be precise.
  1. Use xf86-input-mtrack

Debian Jessie (w/ gnome3) uses the "synaptics" xf86 input module as a default. It is very precise but doesn't support "resting thumb" behaviour that you're used to from OSX.

xf86-input-mtrack is an enhancement of xf86-input-multitouch which is configurable. I built it from source from here: https://github.com/BlueDragonX/xf86-input-mtrack But i see that it's also in the debian package repo. So you probably only need to do:

sudo aptitude install xserver-xorg-input-mtrack

I created an override config in /etc/X11/xorg.conf.d/50-synaptics.conf (create the directory if it doesn't exist) which looks like this:

@ejangi
ejangi / nginx-custom-error-pages.conf
Created June 7, 2015 01:09
NGINX Custom Error Pages
http {
...
server {
...
error_page 401 @401;
location @401 {
root /srv/www/error-documents/public;
try_files /401.html =401;
}
@gaga5lala
gaga5lala / restore_docker_image_tag.sh
Created November 7, 2017 02:04
Restore docker image tag from text file.
# 1. Backup image tags to text file.
# $ docker images --format "{{.Repository}}:{{.Tag}} {{.ID}}" > img_id.txt
#
# 2. Execute clean-docker-for-mac script
# $ bash clean-docker-for-mac.sh $(docker images --format "{{.ID}}" | xargs)
#
# source: https://gist.github.com/MrTrustor/e690ba75cefe844086f5e7da909b35ce#file-clean-docker-for-mac-sh
#
# 3. Execute this script to restore tags from text file.
@haircut
haircut / System - Software Updates.mobileconfig
Created October 10, 2017 01:02
Manage macOS Software Update settings via configuration profile (Jamf Pro)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PayloadContent</key>
<array>
<dict>
<key>PayloadContent</key>
<dict>
<key>com.apple.SoftwareUpdate</key>
@chrislkeller
chrislkeller / README.md
Last active December 18, 2020 08:12
SpreadSheet To Fusion Tables

Script to sync a Google SpreadSheet to a Fusion Table

Save for a few legacy projects that still use Fusion Tables I don't actively use this script anymore. This update hopefully solves the OAuth issue that cropped up once Google depcricated the Client Login method used by the prior version.

As always, your mileage may vary, and I welcome someone -- Google or otherwise -- to offer a long-term maintained solution.

The following is largely cribbed from a Google example here. I try to explain some of the API settings that must be enabled in the Developer's Console and elsewhere

Create your spr

@oshliaer
oshliaer / .how_to_concatenate_ranges_in_google_spreadsheets.md
Last active March 4, 2022 13:57
How to concatenate ranges in Google spreadsheets

How to concatenate ranges in Google spreadsheets

Unsplash

Sometimes it is necessary to concat ranges in Google Spreadsheet. Eg, Data 1 and Data 2

Sheet Data 1

Name Date Sum
Ethan 3/4/2017 31
@jlgaddis
jlgaddis / yubikey_gpg-agent_fedora27.md
Last active April 8, 2022 01:09
Yubikey + gpg-agent on Fedora 27 (XFCE)

Yubikey + gpg-agent (w/ SSH support) on Fedora 27

Note: This assumes that you have already generated your GPG keys (i.e., offline master key + subkeys) and have them in your Yubikey.

Recently, I switched from Arch Linux to Fedora 27 on the hosts that I use daily (my workstation, my "primary" laptop, and a "secondary" laptop). As best as I can recall, here are all of the steps I had to do in order to get things working in addition to some notes ("quoted") that I made at the time.

FWIW, this is greatly "summarized" but I think I've included most of the important bits. It's very possible that I've left out some pieces, though, so feel free to let me know if I've missed something.


@fawkesley
fawkesley / randomize-mac-addresses.sh
Last active July 25, 2022 06:24
In Ubuntu 16.04, randomize WiFi MAC addresses with a daily rotation - /etc/NetworkManager/dispatcher.d/pre-up.d/randomize-mac-addresses.sh
#!/bin/sh
# /etc/NetworkManager/dispatcher.d/pre-up.d/randomize-mac-addresses.sh
# INSTALL
#
# > curl -L 'https://gist.github.com/paulfurley/46e0547ce5c5ea7eabeaef50dbacef3f/raw/56ee5dd5f40dec93b8f7438cbdeda5475ea3b5d2/randomize-mac-addresses.sh' |sudo tee /etc/NetworkManager/dispatcher.d/pre-up.d/randomize-mac-addresses.sh
# > sudo chmod +x /etc/NetworkManager/dispatcher.d/pre-up.d/randomize-mac-addresses.sh
# Configure every saved WiFi connection in NetworkManager with a spoofed MAC
@philipn
philipn / gist:5274197
Last active October 20, 2022 02:37
Running Ubuntu on a Macbook Air

Running Ubuntu on a Macbook Air

You don't have to be a slave to OS X! Here's a guide to a sane dual-booting setup with Ubuntu 12.10 on your shiny MacBook Air. This is written and tested for a MacBook Air 5,2 (Mid 2012), but likely works the same with any modern Macbook.

Install according to instructions at this URL: