Skip to content

Instantly share code, notes, and snippets.

View DarshanKumar89's full-sized avatar

Darshan DarshanKumar89

View GitHub Profile
@DarshanKumar89
DarshanKumar89 / aws-ecs-deploy-permissions.md
Created September 3, 2019 11:49 — forked from duluca/aws-ecs-deploy-permissions.md
npm scripts for AWS ECS (Blue-Green Deployment)

AWS ECS Deploy Permissions

In order to be able to deploy using the scripts provided by npm scripts for AWS ECS make sure your user is part of an IAM Group that has the following inline policy applied to it.

Note: This may not be complete.

{
    "Version": "2012-10-17",
    "Statement": [
@DarshanKumar89
DarshanKumar89 / extensions.json
Created September 3, 2019 11:48 — forked from duluca/Angular VS Code Settings.md
Optimizing VS Code for Angular Development
{
"recommendations": [
"johnpapa.angular-essentials",
"PKief.material-icon-theme",
"formulahendry.auto-close-tag",
"ms-azuretools.vscode-docker",
"eamodio.gitlens",
"WallabyJs.quokka-vscode",
"amatiasq.sort-imports",
"DSKWRK.vscode-generate-getter-setter",
@DarshanKumar89
DarshanKumar89 / awc-ecs-access-to-aws-efs.md
Last active September 3, 2019 11:46 — forked from duluca/awc-ecs-access-to-aws-efs.md
Step-by-step Instructions to Setup an AWS ECS Cluster

Configuring AWS ECS to have access to AWS EFS

If you would like to persist data from your ECS containers, i.e. hosting databases like MySQL or MongoDB with Docker, you need to ensure that you can mount the data directory of the database in the container to volume that's not going to dissappear when your container or worse yet, the EC2 instance that hosts your containers, is restarted or scaled up or down for any reason.

Don't know how to create your own AWS ECS Cluster? Go here!

New Cluster

Sadly the EC2 provisioning process doesn't allow you to configure EFS during the initial config. After your create your cluster, follow the guide below.

New Task Definition for Web App

If you're using an Alpine-based Node server like duluca/minimal-node-web-server follow this guide:

@DarshanKumar89
DarshanKumar89 / media-query.css
Created May 20, 2019 14:11
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
//CSS
@DarshanKumar89
DarshanKumar89 / Aircrack Commands
Created January 30, 2017 18:01 — forked from victorreyesh/Aircrack Commands
Cracking WPA2 / WEP Wifi / Aircrack 10 seconds guide. For Mac OSX
//Install Macports.
//Install aircrack-ng:
sudo port install aircrack-ng
//Install the latest Xcode, with the Command Line Tools.
//Create the following symlink:
sudo ln -s /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport /usr/sbin/airport
//Figure out which channel you need to sniff:
sudo airport -s
sudo airport en1 sniff [CHANNEL]
@DarshanKumar89
DarshanKumar89 / .htaccess file Apache server
Last active July 28, 2016 18:40
Apache server config for Angularjs in AWS
#things to do
1.sudo a2enmod rewrite
2.sudo chmod 644 /var/www/html/.htaccess
3.sudo service apache2 restart
4.sudo a2enmod headers // this for prerender stuff if using prerender.io, which you see from line no.20
5. in /etc/apache2/sites-enabled/default
<Directory /var/www/html>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
@DarshanKumar89
DarshanKumar89 / .htaccess
Created July 26, 2016 11:37 — forked from thoop/.htaccess
Official prerender.io .htaccess for Apache.
# Change YOUR_TOKEN to your prerender token and uncomment that line if you want to cache urls and view crawl stats
# Change http://example.com (at the end of the last RewriteRule) to your website url
<IfModule mod_headers.c>
#RequestHeader set X-Prerender-Token "YOUR_TOKEN"
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
@DarshanKumar89
DarshanKumar89 / jquery-boilerplate.js
Created January 29, 2016 18:09 — forked from cferdinandi/jquery-boilerplate.js
A simple jQuery boilerplate.
/*
* jQuery Boilerplate - v3.3.2
* A jump-start for jQuery plugins development.
* http://jqueryboilerplate.com
*
* Made by Zeno Rocha
* Under MIT License
*/
// the semi-colon before function invocation is a safety net against concatenated
@DarshanKumar89
DarshanKumar89 / GitPatch
Created July 13, 2015 08:44
Create a Git Patch or diff
------------------create diff-------------
#know branch
$ git branch
* experimental
master
#log commits
$ git log --oneline
b36f227 third commit -- added file3
f39ebe8 second commit -- added file2
@DarshanKumar89
DarshanKumar89 / Gitbasics
Last active August 29, 2015 14:24
Git Branching - Basic cloning,Branching and Merging
---------------------Basics of Git -------------------
Clone the repo --git clone git://git.apache.org/hadoop.git
git remote add origin
create branch -- git checkout <name_of_branch> or git checkout -b your_branch
git push <remote-name> <branch-name>
git push <remote-name> <local-branch-name>:<remote-branch-name>
git pull
Gives all the branch --git branch -a