Skip to content

Instantly share code, notes, and snippets.

View mwksl's full-sized avatar
🏔️
Working from home

Matthew mwksl

🏔️
Working from home
View GitHub Profile
import React from "react";
import { render } from "react-dom";
const ParentComponent = React.createClass({
getDefaultProps: function() {
console.log("ParentComponent - getDefaultProps");
},
getInitialState: function() {
console.log("ParentComponent - getInitialState");
return { text: "" };
@AKNiazi
AKNiazi / Deployment Steps Amazon EC2
Created October 1, 2014 05:51
Steps to deploy Ruby on Rails Apps on Amazon EC2 with postgresSql
1. Log in to the AWS console. (First you should create account on Amazon)
2. Create key pair
3. Create elastic IP
4. Make new instance of the aws manually.
5. Create the ppk key from the .pem key.
6. Login to the putty give the public ip to in the host and also add the putty key file in the auth/ssh
7. Provide ubuntu as the user name.
Now after the login
A- Install required ruby version using RVM
@eclubb
eclubb / sqlite2pg.sh
Created March 30, 2012 17:20
Script to import SQLite3 database into PostgreSQL
#!/bin/sh
# This script will migrate schema and data from a SQLite3 database to PostgreSQL.
# Schema translation based on http://stackoverflow.com/a/4581921/1303625.
# Some column types are not handled (e.g blobs).
SQLITE_DB_PATH=$1
PG_DB_NAME=$2
PG_USER_NAME=$3