Skip to content

Instantly share code, notes, and snippets.

View dhamaniasad's full-sized avatar
🏠
Working from home

Asad Dhamani dhamaniasad

🏠
Working from home
View GitHub Profile
service postgresql stop # Stop the server first
rm -rf /var/lib/postgresql/9.4/main # Remove the data directory
envdir /etc/wal-e.d/env /usr/local/bin/wal-e backup-fetch /var/lib/postgresql/9.4/main LATEST # Fetch the backup
restore_command = '/usr/bin/envdir /etc/wal-e.d/env /usr/local/bin/wal-e wal-fetch %f %p' # Create recovery.conf inside data directory
service postgresql start # Start the server
@dhamaniasad
dhamaniasad / on-jsx.markdown
Created January 27, 2016 08:25 — forked from chantastic/on-jsx.markdown
JSX, a year in

Hi Nicholas,

I saw you tweet about JSX yesterday. It seemed like the discussion devolved pretty quickly but I wanted to share our experience over the last year. I understand your concerns. I've made similar remarks about JSX. When we started using it Planning Center, I lead the charge to write React without it. I don't imagine I'd have much to say that you haven't considered but, if it's helpful, here's a pattern that changed my opinion:

The idea that "React is the V in MVC" is disingenuous. It's a good pitch but, for many of us, it feels like in invitation to repeat our history of coupled views. In practice, React is the V and the C. Dan Abramov describes the division as Smart and Dumb Components. At our office, we call them stateless and container components (view-controllers if we're Flux). The idea is pretty simple: components can'

@dhamaniasad
dhamaniasad / ec2-host-from-tag-to-env-vars.sh
Created February 7, 2017 21:08 — forked from marcellodesales/ec2-host-from-tag-to-env-vars.sh
Create Environment Variables in EC2 Hosts from EC2 Host Tags, just like Beanstalk or Heroku does!
######
# Author: Marcello de Sales (marcello.desales@gmail.com)
# Description: Create Create Environment Variables in EC2 Hosts from EC2 Host Tags
#
### Requirements:
# * Install jq library (sudo apt-get install -y jq)
# * Install the EC2 Instance Metadata Query Tool (http://aws.amazon.com/code/1825)
#
### Installation:
# * Add the Policy EC2:DescribeTags to a User
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCl0Jp2FlSfxMtKKLdHWjSAQzsn41UK/n2dW5Zt8HpghDEsGYqsNePYQ/MmKYXp9ZLHM8CG5K9jsJG1fLoukgrd8Je7mrm5GcC3rWghS/XVSJ0t6VyQsK4P/HAMntulcuiVFeQlf4adg6T1W3QFm5bOYthlGSPhn4S2YoAIINselNANulsjPexR0d6Xy+FiDjbkHtZmjvlKp5hkwaM121iK9VW6dTDwOI5fFrxbB+6KDCEkEj8r1N5XKyZIDX3SMSIoJUagHu8WYblCGnjY3UQ2bCZK/qeDWwqBT3ugRYEH3WRewNbuo2L73oV1jbqsz7iGFWXG+TIUEGXOZg/p03Pb asad@Asads-MacBook-Air.local
import React from 'react';
import {Typography, makeStyles, createStyles} from '@material-ui/core';
import {StatusUpdates,
Body
} from 'mock-data-service/types/OrderStatusContent';
export interface OrderStatusDescriptionProps {
currentStatus: string;
content: StatusUpdates;
}