Skip to content

Instantly share code, notes, and snippets.

View vanities's full-sized avatar
🏠
Mining from home

vanities

🏠
Mining from home
View GitHub Profile
vector<vector<int > > v(M, vector<int> (N));
p3 -m cProfile -s time main.py > stats
@vanities
vanities / gist:022ddd6266d67fa487fa5dd69a32f13e
Last active October 25, 2017 02:22
compiler create a git repository
ssh c8089335@system64.cs.mtsu.edu
WVkMTBkZ
git init --bare
git clone c8089335@system64.cs.mtsu.edu:~/CSCI4160/project1/ .
http://killtheyak.com/schedule-jobs-launchd/
launchctl unload -w bgmac.plist
launchctl load -w bgmac.plist
launchctl start com.me.bgmac
@vanities
vanities / gist:2f2cc479dedf4679bbeb6f14838aa11a
Created August 30, 2017 21:07
mac random background crap
https://github.com/carlosabalde/ngwallpaper/blob/master/ngwallpaper.py
https://stackoverflow.com/questions/431205/how-can-i-programmatically-change-the-background-in-mac-os-x
https://gist.github.com/willurd/5829224
defaults write com.apple.Finder AppleShowAllFiles true
killall Finder
@vanities
vanities / gist:57171d34b7f458ebc5d24069aafd0c3e
Last active August 14, 2022 04:05
disable / enable animations on mac
# opening and closing windows and popovers
defaults write -g NSAutomaticWindowAnimationsEnabled -bool false
# smooth scrolling
defaults write -g NSScrollAnimationEnabled -bool false
# showing and hiding sheets, resizing preference windows, zooming windows
# float 0 doesn't work
defaults write -g NSWindowResizeTime -float 0.001
# restart nginx systemd service
sudo service nginx restart
# restart uwsgi config
sudo uwsgi --ini /var/www/homedash/uwsgi.ini
# troublshooting nginx
tail -f /var/log/nginx/access.log
tail -f /var/log/nginx/error.log
@vanities
vanities / gist:af46a1b0aa2b2ff74eae84ee12df2d00
Created August 20, 2017 18:24
disable password for root login ssh
sudo nano /etc/ssh/sshd_config
PermitRootLogin without-password
reload ssh
# make key
ssh-keygen -t rsa
# send key
ssh-copy-id user@192.168.blah
# OR
cat ~/.ssh/id_rsa.pub | ssh user@193.168.blah "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys"