Skip to content

Instantly share code, notes, and snippets.

View golimpio's full-sized avatar

Gilberto Olimpio golimpio

  • Beechworth VIC, Australia
  • 10:30 (UTC +10:00)
  • X @golimpio
View GitHub Profile
@golimpio
golimpio / macOS Internals.md
Created May 17, 2023 08:34 — forked from kconner/macOS Internals.md
macOS Internals

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

@golimpio
golimpio / README.en.md
Created February 21, 2023 23:31 — forked from akihikodaki/README.en.md
Linux Desktop on Apple Silicon in Practice

Linux Desktop on Apple Silicon in Practice

I bought M1 MacBook Air. It is the fastest computer I have, and I have been a GNOME/GNU/Linux user for long time. It is obvious conclusion that I need practical Linux desktop environment on Apple Silicon.

Fortunately, Linux already works on Apple Silicon/M1. But how practical is it?

  • Two native ports exist.
@golimpio
golimpio / universal-switcher
Created March 25, 2022 10:09 — forked from jthodge/universal-switcher
Show macOS app switcher across all monitors
defaults write com.apple.Dock appswitcher-all-displays -bool true
killall Dock
@golimpio
golimpio / hammerspoon-move-resize.lua
Created February 24, 2022 09:49 — forked from kizzx2/hammerspoon-move-resize.lua
Hammerspoon script to move/resize window under cursor
-- Inspired by Linux alt-drag or Better Touch Tools move/resize functionality
function get_window_under_mouse()
-- Invoke `hs.application` because `hs.window.orderedWindows()` doesn't do it
-- and breaks itself
local _ = hs.application
local my_pos = hs.geometry.new(hs.mouse.getAbsolutePosition())
local my_screen = hs.mouse.getCurrentScreen()
@golimpio
golimpio / mdb2sqlite.sh
Created June 24, 2021 07:38 — forked from kazlauskis/mdb2sqlite.sh
Transforms MS Access MDB file to sqlite database using mdbtools
#!/bin/bash
# Inspired by
# https://www.codeenigma.com/community/blog/using-mdbtools-nix-convert-microsoft-access-mysql
# USAGE
# Rename your MDB file to migration-export.mdb
# run ./mdb2sqlite.sh migration-export.mdb
# wait and wait a bit longer...
mdb-schema migration-export.mdb sqlite > schema.sql
@golimpio
golimpio / textmate-lineheight.sh
Last active March 22, 2021 03:51 — forked from kenjij/textmate-lineheight.sh
Line-height adjustment in TextMate 2
# Add extra room between lines (tested with mPlus Nerd Font)
# Adjust space below the line
defaults write com.macromates.TextMate fontLeadingDelta -float 0.5
# Adjust space above the line
defaults write com.macromates.TextMate fontAscentDelta -float 0
# Reset to default
defaults delete com.macromates.TextMate fontLeadingDelta
# inspired by https://github.com/junegunn/fzf/issues/868
function __fzf_ls_files
git ls-tree -r --name-only HEAD 2>/dev/null; or fd --type f --hidden --follow --exclude .git
end
function __fzf_grep_last
set -l cmd (commandline)
# default complete all, and compatible with fzf `**<TAB>`
if str_endswith "$cmd" ' '; or test $cmd = '**'
@golimpio
golimpio / _verify-repair-permissions-disk.md
Created August 8, 2018 23:53 — forked from bzerangue/_verify-repair-permissions-disk.md
Mac OS X Utilities via Terminal: (Verify and Repair: Disk Permissions AND Disk / Software Update / TimeMachine)

Verify and Repair Disk Permissions via Terminal (Mac OS X)

Verify Permissions

diskutil verifyPermissions /

Repair Permissions

diskutil repairPermissions /

@golimpio
golimpio / AuthyToOtherAuthenticator.md
Created June 30, 2018 22:23 — forked from gboudreau/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy

Generating Authy passwords on other authenticators


There is an increasing count of applications which use Authy for two-factor authentication. However many users who aren't using Authy, have their own authenticator setup up already and do not wish to use two applications for generating passwords.

Since I use 1Password for all of my password storing/generating needs, I was looking for a solution to use Authy passwords on that. I couldn't find any completely working solutions, however I stumbled upon a gist by Brian Hartvigsen. His post had a neat code with it to generate QR codes (beware, through Google) for you to use on your favorite authenticator.

His method is to extract the secret keys using Authy's Google Chrome app via Developer Tools. If this was not possible, I guess people would be reverse engineering the Android app or something like that. But when I tried that code, nothing appeared on the screen. My gues

@golimpio
golimpio / ethminer_ubuntu_nvidia.md
Created January 11, 2018 01:22 — forked from johnstcn/ethminer_ubuntu_nvidia.md
NVIDIA/CUDA ethminer setup under Ubuntu Server 16.04

Headless Ethminer (nVidia) Setup Guide

Cian Johnston, July 2017

A couple of weeks ago, I decided I should put my gaming rig to work crypto mining. I did not expect to make any significant profit on this, it was more of a fun project to set up. However, there were a large number of tutorials and guides already out there, and many were more than a year out of date.

This guide assumes the reader already has a crypto wallet set up, is comfortable with Linux and the command line, and knows how to use Google if they run into problems.

The end result is an Ubuntu 16.04 LTS headless server running CUDA ethminer via systemd.

Hardware