Skip to content

Instantly share code, notes, and snippets.

View ardeshir's full-sized avatar
🎯
Focusing

sepahsalar ardeshir

🎯
Focusing
View GitHub Profile
FROM amazonlinux:latest
RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash
RUN export NVM_DIR="$HOME/.nvm" && [ -s "$NVM_DIR/nvm.sh" ] \
&& \. "$NVM_DIR/nvm.sh" && [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" \
&& nvm install v6.10.0 \
&& npm install serverless -g \
&& npm install newman -g \
&& npm install serverless-localstack -g

Frontend Masters: AWS for Frontend Engineers

You should have the following completed on your computer before the workshop:

  • Install the AWS CLI.
  • Have Node.js installed on your system. (Recommended: Use nvm.)
    • Install yarn with brew install yarn.
  • Create an AWS account. (This will require a valid credit card.)
  • Create a Travis CI account. (This should be as simple as logging in via GitHub).
@ardeshir
ardeshir / setup.sh
Created May 14, 2018 16:31 — forked from mlabouardy/setup.sh
Setup CloudWatch alarm with AWS CLI
aws cloudwatch put-metric-alarm --region us-east-1
--alarm-name "HighCPUUtilization"
--alarm-description "High CPU Utilization"
--actions-enabled
--alarm-actions "TOPIC_ARN"
--metric-name "CPUUtilization"
--namespace AWS/EC2 --statistic "Average"
--dimensions "Name=InstanceName,Value=demo"
--period 60
--evaluation-periods 60

Project 1 : Build a Docker Image for Sysfoo

Link to Application Source: https://github.com/schoolofdevops/sysfoo

Description:

Sysfoo is a java based web application, which uses maven as a build tool. The build specifications are provided with pom.xml in the root directory of the project. Your job is to write a dockerfile to build and package the sysfoo application.

@ardeshir
ardeshir / fix-kube-dashboard.md
Created September 25, 2017 18:52 — forked from gouravjshah/fix-kube-dashboard.md
Fix kubernetes Dashboard
kubectl apply -f https://gist.githubusercontent.com/initcron/db8f1bbb5a884a91032cf53cd496a395/raw/aad04d509a751b2ea0cfbf3dbaa6330a1b37699d/dash-svc.yml
kubectl describe svc kdash  -n kube-system
@ardeshir
ardeshir / story.md
Created September 14, 2017 19:38 — forked from posener/go-shebang-story.md
Story: Writing Scripts with Go

Story: Writing Scripts with Go

This is a story about how I tried to use Go for scripting. In this story, I’ll discuss the need for a Go script, how we would expect it to behave and the possible implementations; During the discussion I’ll deep dive to scripts, shells, and shebangs. Finally, we’ll discuss solutions that will make Go scripts work.

Why Go is good for scripting?

While python and bash are popular scripting languages, C, C++ and Java are not used for scripts at all, and some languages are somewhere in between.

---
# tasks file for app_service_setup
#
- block:
- name: Deploy application service script
template:
src: service.j2
dest: /etc/init.d/app-{{ app_name }}
owner: root
group: root
---
# tasks file for app_service_setup
#
- block:
- name: Deploy application service script
template:
src: service.j2
dest: /etc/init.d/app-{{ app_name }}
owner: root
group: root
@ardeshir
ardeshir / java-8-ami.md
Created July 7, 2017 18:15
[Guide] Install Oracle Java (JDK) 8 on Amazon EC2 Ami
@ardeshir
ardeshir / Deploy-Windows-Service-Via-MSBuild.proj.xml
Created May 23, 2017 15:26 — forked from mrchief/Deploy-Windows-Service-Via-MSBuild.proj.xml
MSBuild Script to deploy Windows Service to remote or local machine
<Project DefaultTargets="CopyOutputs;DeployService" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<!-- These settings control what the service's name, description etc appear in services.msc task panel. -->
<PropertyGroup Label="ServiceMetaData">
<ServiceName>ShinyNewService</ServiceName>
<ServiceDisplayName>Shiny New Service</ServiceDisplayName>
<ServiceDescription>A shiny new service, that changes the world for the greater good.</ServiceDescription>
</PropertyGroup>
<Choose>