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
git fetch --all
git reset --hard origin/master
@vanities
vanities / gist:999c2bb86ce85438fd1ab8e6b737d008
Created August 20, 2017 18:03
tomato linksys e3200 30-30-30 reset
Download the firmware into your PC. Head to http://tomato.groov.pl/download/K26RT-N/build5x-116-EN/Linksys%20E-series/, and grab the E3200USB (check the filename) file. If you have other Linksys routers, you can look around in the directory for your model number.
Perform a 30-30-30 reset of the Linksys E3200. While the E3200 is plugged in with the power on, and no other cables connected, press and hold the reset button for 30 seconds. Still keeping the reset button depressed, unplug the power cable, and hold the reset button for a further 30 seconds. Finally, with the reset button still depressed, reconnect the power cable, and wait 30 more seconds before releasing the reset button. Altogether, you would have held the reset button for at least 90 seconds.
Login to the E3200. It’s default IP is 192.168.1.1, username is admin and password is admin. I suggest to connect via an Ethernet cable to the LAN port.
Go to Administration, Firmware update.
Select the file you downloaded above. Press
# 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"
@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
# 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
defaults write com.apple.Finder AppleShowAllFiles true
killall Finder
@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
http://killtheyak.com/schedule-jobs-launchd/
launchctl unload -w bgmac.plist
launchctl load -w bgmac.plist
launchctl start com.me.bgmac
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/ .