Skip to content

Instantly share code, notes, and snippets.

View iMagdy's full-sized avatar
🔥
Full Stack Developer

Islam Magdy iMagdy

🔥
Full Stack Developer
View GitHub Profile
.container {
scroll-snap-type: y mandatory; /* for vertical scrolling you can use x for horizontal */
}
.child {
scroll-snap-align: start; /* or center or end */
}
@iMagdy
iMagdy / cloudformation_200_error.sh
Last active November 10, 2019 19:54
cloudformation_200_error.sh
Error --------------------------------------------------
The CloudFormation template is invalid: Template format error: Number of resources, 237, is greater than maximum allowed, 200
@iMagdy
iMagdy / .gitconfig
Created October 3, 2015 13:12 — forked from pksunkara/config
Sample of git config file (Example .gitconfig)
[user]
name = Pavan Kumar Sunkara
email = [email protected]
[core]
editor = vim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
excludesfile = ~/.gitignore
[sendemail]
smtpencryption = tls
smtpserver = smtp.gmail.com
@iMagdy
iMagdy / app-file-server.js
Created September 10, 2013 18:10
Meteor file upload smart package, compatible with Meteor 0.6.5+, forked from http://stackoverflow.com/a/17893456
var connect = Npm.require('connect');
RoutePolicy.declare('/my-uploaded-content', 'network');
// Listen to incoming http requests
WebApp.connectHandlers.use('/my-uploaded-content', connect.static(process.env['APP_DYN_CONTENT_DIR']));
@iMagdy
iMagdy / meteor_forever.sh
Created September 9, 2013 13:51
Run meteor on your own infrastructure using forever (npm install -g forever)
export MONGO_URL=mongodb://localhost:27017/<dbname>
export PORT=<server_port>
export ROOT_URL=http://sub.example.com/
forever start bundle/main.js
@iMagdy
iMagdy / node_apache.apacheconf
Last active February 25, 2020 00:46
This virtualhosts snippet will make your nodejs app run on the traditional port 80, so mynodeapp.com:3000 will simply work on mynodeapp.com without adding :3000. it's that simple :) remember to enable apache modules proxy and proxy_http ($ sudo a2enmod proxy && sudo a2enmod proxy_http)
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName js.io
ServerAlias js.io
ProxyRequests off
<Proxy *>
Order deny,allow
Allow from all
@iMagdy
iMagdy / how_to_upload_local_db_to_meteor_app.sh
Last active February 27, 2016 09:55
How to upload local db to meteor app
# How to upload local db to meteor:
# -h = host, -d = database name, -o = dump folder name
mongodump -h 127.0.0.1:3002 -d meteor -o meteor
# get meteor db url, username, and password
meteor mongo --url myapp.meteor.com
# -h = host, -d = database name (app domain), -p = password, meteor = the path to the dumped db folder name
mongorestore -u client -h production-db-a2.meteor.io.meteor.com:27017 -d myapp_meteor_com -p 'password' meteor/