Skip to content

Instantly share code, notes, and snippets.

View hosamshahin's full-sized avatar

Hossameldin Shahin hosamshahin

  • Thomson Reuters
  • Waterloo, ON, Canada
View GitHub Profile
upload new exercise
gym/exercises/upload
create workout
gym/workouts/new
edit workout
gym/workouts/:id/edit
- Create a csr file
openssl genrsa -des3 -out opendsa-server.cs.vt.edu.key 2048
openssl req -new -key opendsa-server.cs.vt.edu.key -out opendsa-server.cs.vt.edu.csr
Country: US
State: Virginia
Locality: Blacksburg
Organization: Virginia Polytechnic Institute and State University
Organization Unit: Computer Science Department
To copy a file from B to A while logged into B:
scp /path/to/file username@a:/path/to/destination
To copy a file from B to A while logged into A:
scp username@b:/path/to/file /path/to/destination
adding port
scp -P 80 username@b:/path/to/file /path/to/destination
- log files
sudo tail -n 300 -f /var/log/apache2/access.log
sudo tail -n 300 -f /var/log/apache2/error.log
@hosamshahin
hosamshahin / bash-cheatsheet.sh
Last active September 5, 2017 20:35 — forked from LeCoupa/bash-cheatsheet.sh
Shell: Bash CheatSheet for UNIX Systems
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
VT course definition:
CS2114
Software Design & Data Structures
https://www.cs.vt.edu/undergraduate/courses/CS2114
CS3114
Data Structures & Algorithms
https://www.cs.vt.edu/undergraduate/courses/CS3114
- remove local storage
chrome://settings/cookies#cont
- changes required to you app before deployment
http://railsapps.github.io/rails-heroku-tutorial.html
- Progress bar
https://infinum.co/the-capsized-eight/articles/progress-bar-in-rails
- background jobs
https://www.agileplannerapp.com/blog/building-agile-planner/rails-background-jobs-in-threads
# Rails Migration
http://guides.rubyonrails.org/migrations.html
## Migrations methods:
* add_column
* add_index
* change_column
* change_table
* create_table
* drop_table