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
| sudo du -h --max-depth=1 /home | sort -nk1 |
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
| # Amazon linux | |
| $ sudo yum install hstr | |
| # Ubuntu | |
| sudo apt-get install software-properties-common | |
| sudo apt-add-repository -y ppa:ultradvorka/ppa | |
| sudo apt-get update | |
| sudo apt-get install -y hh |
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 | |
| scp <username>@<hostname>:</path/to/file/to/download> <local path> | |
| - upload | |
| scp </path/to/local/file/to/upload> <username>@<hostname>:<destination path> |
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
| zip -r myzipfile.zip ../backups/code/20110625 app/* content/* . * |
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
| - login to MySQL using root user | |
| mysql -u root -p root | |
| create database opendsa_lti; | |
| grant all privileges on opendsa_lti.* to 'opendsa'@'localhost' identified by 'opendsa'; | |
| FLUSH PRIVILEGES; | |
| exit |
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
| connection method: Standard TCP/IP over SSH | |
| SSH Hostname: 192.168.33.10 | |
| SSH Username: vagrant | |
| SSH Password: vagrant | |
| SSH Key File: ~/.vagrant.d/insecure_oreivate_key | |
| MySQL Hostname: 127.0.0.1 | |
| MySQL Server Port: 3306 | |
| Username: root | |
| Password: password |
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
| immigrant: This generates a migration that builds all missing foreign key constraints. | |
| (https://github.com/jenseng/immigrant) |
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
| - simple tutorial | |
| https://hackhands.com/ruby-rails-tutorial-creating-rails-instance-existing-mysql-db/ | |
| - StackoverFlow discussion | |
| http://stackoverflow.com/questions/4119659/rails-3how-to-generate-models-for-existing-database-tables | |
| - Translate legacy db to ActiveRecord models | |
| https://github.com/wnameless/rare_map | |
| - helpful bolg post |
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
| - Configuring User Model | |
| http://code.tutsplus.com/tutorials/create-beautiful-administration-interfaces-with-active-admin--net-21729 | |
| - this stackoverflow discussion solve it | |
| http://stackoverflow.com/questions/8360787/rails-3-can-active-admin-use-an-existing-user-model | |
| - better follow the documentation! | |
| http://activeadmin.info/docs/0-installation.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
| public int factorial(int n) | |
| { | |
| int result = 1; | |
| for (int i = 1; i <= n; i++) { | |
| result = result * i; | |
| } | |
| return result; | |
| } |