-
-
Save duikb00t/7725bf35ca62dd78b470 to your computer and use it in GitHub Desktop.
Command # Get SSH Key
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
## SSH ## | |
#Get the generated SSH key. | |
cat ~/.ssh/id_rsa.pub | |
#ECDSA | |
ssh-keygen -l -f /etc/ssh/ssh_host_ecdsa_key.pub | |
# Connection fast SSH: | |
vi ~/.bashrc | |
# Add Aliases based on your connection: | |
alias usernameAlias='ssh username1@host1' | |
alias usernameAlias2='ssh username2@host2' | |
# Duplicate a folder | |
cp -a orignalFolder/ duplicateFolder | |
cp -rp currentFolder/ duplicateFolder | |
# Rename a folder | |
mv currentNameFolder/ NewFolderName | |
# Move all files/folders to another one. | |
mv * /otherFolder | |
# Transfer Files | |
scp -r username@host:apps/default/foldername /Volumes/server1/2016/yourFolder/ | |
scp -r /Folder/On/Compuer username@host:apps/default/foldername | |
# Grunt - Locally watch | |
./node_modules/.bin/grunt | |
# GIT | |
# Set up a local repo and push changes to a test server. | |
# 1. Setup the local Git repository. ( Git init // .gitignore ) | |
# 2. Setup a new repo on BitBucket/Github | |
# 3. Setup the right keys, user key from your local machine, deploy key from the webserver. | |
# 3.1 ! Make sure the keys are being generated on the server side. | |
# https://help.github.com/articles/generating-ssh-keys/#step-2-generate-a-new-ssh-key | |
# cat ~/.ssh/id_rsa.pub | |
# 4. Everything should be right, and it should be possible now to pull/push between a local and test-server. | |
# Composer | |
# Downgrade to a older version of Laravel (Remove Vendor/ and run composer install ) | |
"composer require laravel/framework:5.0.* --update-with-dependencies" | |
# Downgrade a specif package | |
composer require mcamara/laravel-localization:1.0.* | |
### SQL ### | |
- DML (Data Manipulation Language) | |
A data manipulation language (DML) is a family of syntax elements similar to a computer programming language used for selecting, inserting, deleting and updating data in a database. | |
- DDL (Data Definition Language) | |
A data definition language or data description language (DDL) is a syntax similar to a computer programming language for defining data structures, especially database schemas. | |
- DCL (Data Control Language) ( Grant / Revoke ) | |
A data control language (DCL) is a syntax similar to a computer programming language used to control access to data stored in a database (Authorization). In particular, it is a component of Structured Query Language (SQL). | |
* GRANT to allow specified users to perform specified tasks. | |
* REVOKE to cancel previously granted or denied permissions. | |
- ISSUES: Pushed commits to the wrong repository | |
cd ../{old_project}/ | |
git fetch | |
git status | |
git log | head | |
git log origin/master | head | |
git push -f | |
SQL COMMAND LINE: | |
// Connect to database in CLI | |
mysql -u username -pPassword | |
// Check datbase table fields etc.. | |
desc tablename |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment