Skip to content

Instantly share code, notes, and snippets.

View matthewblott's full-sized avatar

Matthew Blott matthewblott

View GitHub Profile
#!/usr/bin/env bash
# mac services
# https://gist.github.com/marcelaraujo/9a9fe07c5a4bcaea8c06
# disable SIP from recovery mode
csrutil disable
# disable spotlight indexing
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
#!/usr/bin/env bash
# add note
nb a "some text"
# edit note 12
nb e 12
# delete note 12
nb d 12
[
{ "keys": ["super+q"], "command": "exit" },
{ "keys": ["super+shift+n"], "command": "new_window" },
{ "keys": ["super+shift+w"], "command": "close_window" },
{ "keys": ["super+o"], "command": "prompt_open_file" },
// { "keys": ["super+shift+t"], "command": "reopen_last_file" },
{ "keys": ["super+n"], "command": "new_file" },
{ "keys": ["super+s"], "command": "save", "args": { "async": true } },
{ "keys": ["super+shift+s"], "command": "prompt_save_as" },
// { "keys": ["super+f4"], "command": "close_file" },
#!/usr/bin/env bash
# allow port 80 (tcp optional)
sudo ufw allow 80
sudo ufw allow 80/tcp
# block port 80
sudo ufw deny 80
# allow 1433 access for specific IP address
#!/usr/bin/env bash
chmod -R 666 *
#!/usr/bin/env bash
# Update the ufw rules to allow access for the supplied IP address to the port specified below.
# If a rule already exists it will be deleted.
# This script was created to get round server restrictions when working at home without allowing open
# public access.
PORT=1433
ip=$1
#!/bin/sh -x
#This script removes Mono from an OS X System. It must be run as root
rm -r /Library/Frameworks/Mono.framework
rm -r /Library/Receipts/MonoFramework-*
for dir in /usr/bin /usr/share/man/man1 /usr/share/man/man3 /usr/share/man/man5; do
(cd ${dir};
#!/usr/bin/env bash
# go to character 25 on line 2
:call cursor(2,25)
# show whitespace
:set listchars=eol:¬,tab:>·,trail:~,extends:>,precedes:<,space:␣
:set list
# hide whitespace
#!/usr/bin/env bash
# list the directories in the current directory
tree -d -L 1
# list the directories, and their immediate child directories in the current directory
tree -d -L 2