Skip to content

Instantly share code, notes, and snippets.

View saurabh-sp-tripathi's full-sized avatar

saurabh-sp-tripathi

View GitHub Profile
@herrera-ignacio
herrera-ignacio / ec2-apache.sh
Created July 26, 2019 01:01
EC2 User data: install Apache web server for Amazon Linux 2 Image
#!/bin/bash
########################################
##### USE THIS WITH AMAZON LINUX 2 #####
########################################
# get admin privileges
sudo su
# install httpd (Linux 2 version)
@saurabh-sp-tripathi
saurabh-sp-tripathi / git-cmd.md
Last active May 22, 2020 17:24
This gist contains list of reference of git commands or workflows
  • list branches (local i.e tracking and remote): git branch -vv
  • checkout: git checkout --track origin/abranch
  • Create remote branch
    //Create a new branch:
    git checkout -b feature_branch_name
    //Edit, add and commit your files. Push your branch to the remote repository:
    git push -u origin feature_branch_name
@brianredbeard
brianredbeard / get_token.md
Last active October 3, 2022 02:18
aws, sts, and bash

About

AWS provides a mechanism for temporarily assuming another role within their API system. While it is not a technically hard process it can be convoluted and hard to understand. This document aims to both make it easier to follow along with as well as give an in depth explanation of some of the underpinnings of the Bourne Again Shell (aka BASH) which can make this easier to utilize on a day to day basis.

Explanation

Below is an overexplained version of the following process:

  1. Using credentials stored in ~/.aws/credentials as a "profile" which are then understood by the AWS command line tools
  2. Using those AWS credentials, temporarily assume a role using the AWS Security Token Service (STS) to get temporary
@yesvods
yesvods / gist:51af798dd1e7058625f4
Created August 15, 2015 11:13
Merge Arrays in one with ES6 Array spread
const arr1 = [1,2,3]
const arr2 = [4,5,6]
const arr3 = [...arr1, ...arr2] //arr3 ==> [1,2,3,4,5,6]
@MatthewSteeples
MatthewSteeples / mousemove.ps1
Created February 26, 2015 19:09
Powershell Script to keep the mouse moving
Add-Type -AssemblyName System.Windows.Forms
while ($true)
{
$Pos = [System.Windows.Forms.Cursor]::Position
$x = ($pos.X % 500) + 1
$y = ($pos.Y % 500) + 1
[System.Windows.Forms.Cursor]::Position = New-Object System.Drawing.Point($x, $y)
Start-Sleep -Seconds 10
}
@evanscottgray
evanscottgray / docker_kill.sh
Last active November 7, 2023 03:40
kill all docker containers at once...
docker ps | awk {' print $1 '} | tail -n+2 > tmp.txt; for line in $(cat tmp.txt); do docker kill $line; done; rm tmp.txt
@rxaviers
rxaviers / gist:7360908
Last active April 18, 2024 04:58
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@lordofthelake
lordofthelake / .gitignore
Created June 21, 2013 18:39
.gitignore for Maven, Intellij, Eclipse
# Eclipse
.classpath
.project
.settings/
# Intellij
.idea/
*.iml
*.iws
@katta
katta / groovy-execute-command.groovy
Created April 26, 2013 06:09
Groovy shell command
def command = "git --version"
def proc = command.execute()
proc.waitFor()
println "Process exit code: ${proc.exitValue()}"
println "Std Err: ${proc.err.text}"
println "Std Out: ${proc.in.text}"