-
Boot to Recovery Mode by holding
command-R
during restart -
Open Tools → Terminal and type
$ csrutil disable
$ reboot
#!/bin/bash | |
# IMPORTANT: Don't forget to logout from your Apple ID in the settings before running it! | |
# IMPORTANT: You will need to run this script from Recovery. In fact, macOS Catalina brings read-only filesystem which prevent this script from working from the main OS. | |
# This script needs to be run from the volume you wish to use. | |
# E.g. run it like this: cd /Volumes/Macintosh\ HD && sh /Volumes/Macintosh\ HD/Users/sabri/Desktop/disable.sh | |
# WARNING: It might disable things that you may not like. Please double check the services in the TODISABLE vars. | |
# Get active services: launchctl list | grep -v "\-\t0" | |
# Find a service: grep -lR [service] /System/Library/Launch* /Library/Launch* ~/Library/LaunchAgents |
set background=dark | |
highlight clear | |
let colors_name = "alias" | |
"Set environment to 256 colours | |
set t_Co=256 | |
if version > 580 |
define(function () { 'use strict'; | |
function log(...args) { | |
console.log('%ctype-challenges =>', 'color: teal', ...args); | |
} | |
function noop() { } | |
function is_promise(value) { | |
return value && typeof value === 'object' && typeof value.then === 'function'; | |
} |
sudo apt-get install -y apt-file findutils mawk binutils | |
find -type f | xargs -L1 file | awk -F: '/ELF/{print$1}' | xargs -L1 readelf -d | awk '/\[[a-zA-Z_-\.0-9]*\]/{sub(/.*\[/,"");sub(/\].*/,"");print$0}' | xargs -L1 apt-file search | awk -F: '!/-dbg|-i386|lib32|gcc-snapshot/ && !($1 in a){a[$1];print $1}' |
#!/bin/sh | |
which git >/dev/null 2>&1 | |
[ $? -ne 0 ] && echo "git required" && exit 1 | |
git clone git://github.com/steakknife/dotfiles.git ~/.dotfiles | |
[ $? -ne 0 ] && echo "could not clone repo && exit 1 | |
pushd . >/dev/null 2>&1 | |
cd ~/.dotfiles |
find -type f -exec file {} \; \ | |
| awk -F: '/ELF/{print$1}' \ | |
| xargs -I% readelf -d % \ | |
| awk '/Shared/{gsub("\\[","",$5);gsub("\\]","",$5);if(length($5)>1){x[$5]++}} END{for(i in x){print i}}' \ | |
| xargs -L1 apt-file find \ | |
| awk -F: '{x[$1]++} END{for(i in x){print i}}' \ | |
| awk '!/32|-dbg$|-i386$/' |
find . -type f `find tz?(32|64){code,data}*\.tar\.{gz,Z} | xargs -I% echo "-name % -prune -o"` -type f -name '*' -exec \rm -i {} \; |
#!/bin/sh | |
# creates env.{source|run}.SHELL, diff them for details for details. | |
# It is not fancy. | |
# Usage: compare_shells | |
for MY_SHELL in zsh rbash bash sh tcsh csh ksh dash; do | |
THE_SHELL=`which $MY_SHELL 2>/dev/null` | |
if [ -x "$THE_SHELL" ]; then | |
echo "$THE_SHELL" | |
echo "$THE_SHELL" | grep 'cs' >/dev/null && SRC='source' || SRC='.' |
mount | grep '(rw.*quota.*)' | cut -d' ' -f3 | xargs -I% sh -exc "{ [ -e %/aquota.group ] && [ -e %/aquota.user ] ; } || quotacheck -cug %" |