Skip to content

Instantly share code, notes, and snippets.

View glimpsed's full-sized avatar

Sergiu Gâtlan glimpsed

View GitHub Profile
@glimpsed
glimpsed / vbox.sh
Created September 26, 2016 10:13
Fix permissions for Virtualbox failing to launch on macOS Sierra (org.virtualbox.app.VirtualBox Service exited with abnormal code: 1)
for bin in VirtualBox VirtualBoxVM VBoxNetAdpCtl VBoxNetDHCP VBoxNetNAT VBoxHeadless; do
sudo chmod u+s "/Applications/VirtualBox.app/Contents/MacOS/${bin}"
done
@glimpsed
glimpsed / brutal-terminal-stuff
Created April 10, 2015 08:53
brutal command-line stuff
sudo pkill -9 -v python
translation: "as the superuser, kill, with extreme prejudice, every process which is not python".
@glimpsed
glimpsed / brew.sh
Last active October 17, 2016 03:57
Homebrew maintenance & OS X apps installation
#!/usr/bin/env bash
brew update
# Upgrade already-installed formulae.
brew upgrade --all
# Install apps
brew install wget firefox vlc dropbox filezilla the-unarchiver tunnelblick virtualbox seashore appcleaner adium fog beardedspice cdock the-escapers-flux maintenance progressive-downloader
@glimpsed
glimpsed / OS X Install ISO Creator
Created April 19, 2017 07:09
Create install ISO image, supported OS X versions: 10.6, 10.7, 10.8, 10.9, 10.10, 10.11, 10.12.
#!/bin/bash
################################
# OS X Install ISO Creator #
# #
# Author: shela #
################################
#######################################
# Declarations
@glimpsed
glimpsed / proxy-toggle.sh
Last active September 12, 2017 14:19 — forked from dgoguerra/proxy-toggle.sh
Script to toggle macOS SOCKS proxy on Wi-Fi, and setup a SOCKS server with SSH
#!/bin/sh
PROXY_INTERFACE="Wi-Fi"
PROXY_HOST=127.0.0.1
PROXY_PORT=1080
SOCKS_PROC_LOG=/tmp/ssh-socks-proxy-log.txt
SOCKS_PROC_PIDFILE=/tmp/ssh-socks-proxy-pid.txt
SOCKS_PROC_CMD="ssh -i $SOCKS_PROC_IDENTITY -t -t -D $PROXY_HOST:$PROXY_PORT $SOCKS_PROC_USER@$SOCKS_PROC_HOST"
@glimpsed
glimpsed / OS X tips and tricks
Last active March 8, 2018 03:58
OS X tips and tricks
Fix slow Finder:
rm ~/Library/Caches/CloudKit/CloudKitMetadata*;killall cloudd
Fix macOS not remembering keyboard shortcuts:
rm ~/Library/Preferences/com.apple.symbolichotkeys.plist
rm ~/Library/Preferences/com.apple.symbolichotkeys.plist.lockfile
log out
set keyboard shortcuts
log out
@glimpsed
glimpsed / osx-software-update-urls.txt
Last active April 4, 2018 14:47 — forked from stefanschmidt/osx-software-update-urls.txt
URLs for the OS X update catalog
10.3 (Panther): http://swscan.apple.com/scanningpoints/scanningpointX.xml
10.4 (Tiger): http://swscan.apple.com/content/catalogs/index-1.sucatalog
10.5 (Leopard): http://swscan.apple.com/content/catalogs/others/index-leopard.merged-1.sucatalog
10.6 (Snow Leopard): http://swscan.apple.com/content/catalogs/others/index-leopard-snowleopard.merged-1.sucatalog
10.7 (Lion): http://swscan.apple.com/content/catalogs/others/index-lion-snowleopard-leopard.merged-1.sucatalog
10.8 (Mountain Lion): http://swscan.apple.com/content/catalogs/others/index-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog
10.9 (Mavericks): http://swscan.apple.com/content/catalogs/others/index-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog
10.9 (Mavericks incl. seeds): http://swscan.apple.com/content/catalogs/others/index-10.9seed-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog
10.10 (Yosemite): http://swscan.apple.com/content/catalogs/others/index-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.suc
@glimpsed
glimpsed / gist:1621df7db753de6198747d8c34e92a81
Created June 13, 2018 10:01
Fix broken Spotlight / Time Machine (white pointer on black screen on shutdown and/or restart)
The problem is not with Spotlight, but with Launch Services. There are two steps to solving the problem:
sudo mkdir /private/var/db/lsd
sudo /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -seed -lint -r -f -v -dump -domain local -domain system -domain user -domain network
The first one creates the folder that the launch services daemon needs to store the database. That’s why LaunchServices is getting an -10822 error, because it can’t create the database, so it keeps resetting the connection. The second command tells launch services to kill the old database and create a new one from scratch. Voila

Keybase proof

I hereby claim:

  • I am glimpsed on github.
  • I am serghei (https://keybase.io/serghei) on keybase.
  • I have a public key ASDcYh6NEF0KSc8Vb5bRvRWIx4ddhtDtyRAKohJPATqYWQo

To claim this, I am signing this object:

@glimpsed
glimpsed / BACKUP DNS
Last active February 6, 2019 16:27
Backup dns servers
CloudFlare:(SPEED):
1.1.1.1
1.0.0.1
IBM Quad9 (FILTERING):
9.9.9.9
Google:
8.8.8.8
8.8.4.4