Skip to content

Instantly share code, notes, and snippets.

@naus3a
naus3a / glewInfo.txt
Created September 18, 2017 07:04
glewInfo, OSX 10.8.5, MBP mid2012, NVIDIA GeForce GT650M
---------------------------
GLEW Extension Info
---------------------------
GLEW version 2.1.0
Running on a NVIDIA GeForce GT 650M OpenGL Engine from NVIDIA Corporation
OpenGL version 2.1 NVIDIA-8.16.76 310.40.00.20f04 is supported
GL_VERSION_1_1: OK
@naus3a
naus3a / tellGatekeeperAllIsGood.command
Created February 15, 2018 11:35
Bash script to fix the infamous Gatekeeper path randomization issue in Sierra or above
#/bin/bash
here="`dirname \"$0\"`"
for i in $here/*.app; do
cp -r $i ~/Desktop/temp.app
cp -r ~/Desktop/temp.app $i
rm -rf ~/Desktop/temp.app
xattr -dr com.apple.quarantine $i
done
@naus3a
naus3a / launcher.command
Created April 2, 2018 19:28
Launch the 1st .app in the script folder
#/bin/bash
here="`dirname \"$0\"`"
for i in $here/*.app; do
filename=$(basename -- "$i")
extension="${filename##*.}"
filename="${filename%.*}"
$i/Contents/MacOS/$filename
break
done
#!/bin/bash
ps aux | grep $1
#!/bin/bash
# 1st argument is session name, 2nd argument is application
screen -d -m -S $1 $2
#!/bin/bash
screen -X -S $1 quit
#!/bin/bash
LIST="$(screen -ls | grep '(*)' | awk -F'.' '{ print $1 }')"
if [ ${#LIST} -gt 0 ]
then
echo "Killing screens"
while read -r line; do
./killScreen.sh $line
done <<< "$LIST"
else
#!/bin/bash
# ./cloneIn.sh [dest_path] [user] [pass] [repo]
DIR=$1
rm -r $DIR/*
cd $DIR
git clone https://$2:$3@$4
@naus3a
naus3a / cleanupDevStuff.sh
Created July 31, 2020 11:18
osx dev cleanup
#!/bin/bash
brew update && brew upgrade && brew cleanup
rm -rf "${HOME}/Library/Caches/CocoaPods"
#old simulators
xcrun simctl delete unavailable
#xcode archives
rm -rf ~/Library/Developer/Xcode/Archives
rm -rf ~/Library/Developer/Xcode/DerivedData
rm -rf ~~/Library/Developer/Xcode/iOS Device Logs/
@naus3a
naus3a / conwaySpinner.sh
Created November 5, 2020 18:05
bash Conway glider spinner
#!/bin/bash
frames=("⠢⠇" "⠨⠖" "⠬⠆" "⠐⡴" "⠢⠇" "⠨⠖" "⠬⠆" ".." "⣤ ")
nFrames=${#frames[@]}
curFrame=0
frameTime=0.2
printf " "
while true; do
printf "\033[2D${frames[$curFrame]}"
curFrame=$[$curFrame+1]
if [ $curFrame -ge $nFrames ]; then