adduser username
usermod -aG sudo username
- edit /etc/ssh/sshd_config by setting
PubkeyAuthentication yes
cd /home/username
mkdir .ssh
sudo chown yourusername:yourusername /home/username/ -R
sudo chmod 700 /home/username/ -R
- on local
ssh-copy-id -i identifyfile username@ip
- try
ssh username@ip
, if it fails continue - on local
cat .ssh/id_rsa.pub
This file contains 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
df['year'] = pd.DatetimeIndex(df['date']).year |
This file contains 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
pip install --upgrade git+https://github.com/@username/@repo.git |
This file contains 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
lsof -wni tcp:3000 | |
kill -9 [PID] |
I hereby claim:
- I am joshuamschultz on github.
- I am joshuamschultz (https://keybase.io/joshuamschultz) on keybase.
- I have a public key ASDId5Yy4Tk9eGSOnvnd5lQ3Ka4DrE-Gv2aHvroeADwLBAo
To claim this, I am signing this object:
This file contains 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
You can use data- attributes to pass arbitrary values to a HTML element: | |
link_to service.company.name, # e.g. "ACME" | |
'#', | |
:class => 'specific_service', | |
:data => {:id => service.id} # e.g. 12345 | |
which will result in something like this: | |
<a href="#" class="specific_service" data-id="12345">ACME</a> | |
this can be retrieved inside the Javascript, e.g. with jQuery: |
This file contains 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
Find out the process ID (PID) which is occupying the port number (e.g., 5955) you would like to free | |
sudo lsof -i :5955 | |
Kill the process which is currently using the port using its PID | |
sudo kill -9 PID |
This file contains 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
brew unlink imagemagick | |
brew install imagemagick@6 && brew link imagemagick@6 --force |
This file contains 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
for b in `git branch -r | grep -v -- '->'`; do git branch --track ${b##origin/} $b; done | |
git fetch --all |
This file contains 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
## pg_hba.conf | |
# TYPE DATABASE USER ADDRESS METHOD | |
host all all 0.0.0.0/0 md5 | |
## postgresql.conf | |
listen_addresses = '*' |
NewerOlder