Skip to content

Instantly share code, notes, and snippets.

View dasgoll's full-sized avatar

dasgoll

  • Amman, Jordan
View GitHub Profile
@SteveHoggNZ
SteveHoggNZ / gist:cd3855a329632a3c3934adb80a5a646d
Created December 2, 2016 00:02
CloudFormation / Nested stack example
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "Master template that includes nested templates",
"Parameters": {
"DeployBastion": {
"Description": "Should a bastion server be deployed?",
"Default": "No",
"Type": "String",
"AllowedValues": ["No", "Yes"]
}
@guanting112
guanting112 / install_source_command_line_tools.sh
Last active May 9, 2023 13:52
[macOS] SourceTree command line tools install script ( support 10.11, 10.12 )
#!/usr/bin/env bash
function link_stree {
ln -s /Applications/SourceTree.app/Contents/Resources/stree /usr/local/bin/
}
function install {
link_stree
}
@smoll
smoll / USING-DIFFMERGE.md
Last active October 21, 2023 23:37
Using DiffMerge as your git mergetool (for Mac OS X / macOS)
package main
import (
"net/http"
"html/template"
)
func handler(w http.ResponseWriter, r *http.Request) {
t, _ := template.ParseFiles("view.html") //setp 1
t.Execute(w, "Hello World!") //step 2
@justinpawela
justinpawela / config
Created August 3, 2016 01:39
AWS CodeCommit Multiple Account Config
# This file is: ~/.ssh/config
# You may have other (non-CodeCommit) SSH credentials stored in this
# config file – in addition to the CodeCommit settings shown below.
# NOTE: Make sure to run [ chmod 600 ~/.ssh/config ] after creating this file!
# Credentials for Account1
Host awscc-account1 # 'awscc-account1' is a name you pick
Hostname git-codecommit.us-east-1.amazonaws.com # This points to CodeCommit in the 'US East' region
@maxivak
maxivak / __readme.md
Last active February 22, 2024 11:55
Building Docker image with Packer and provisioning with Ansible

Building Docker image with Packer and provisioning with Ansible

Overview

Packer

  • Packer is used to build image from a base image, perform provisions and store (commit) the final image.

  • We use provisioners and Packer templates to do the actual work to create the final image.

  • We use Ansible for provisioning.

@ralph-tice
ralph-tice / gist:bc8f66c4fe1d4238ce54c54272fc4ba2
Last active April 1, 2020 10:03
Resizing a Kafka cluster via bash
#!/bin/bash -xe
# requires jq and 3 brokers to start
which jq || echo 'no jq found, bye!' && exit 1
ZK_HOST=zkhost1:2181/kafka
# record all topics
/usr/local/kafka/bin/kafka-topics.sh --zookeeper $ZK_HOST --list > all_topics
# generate json for listing which topics to reassign
@hatappi
hatappi / gist:92c27bd03ff282dbd731c0436876cb93
Last active June 10, 2021 12:00
airflow webserver init script
#!/bin/bash
EXEC_SCRIPT=/opt/local/bin/airflow
CMDNAME=`basename $0`
LOG_DIR=/var/log/airflow
PID_DIR=/var/run
PID_FILE="$PID_DIR"/airflow_webserver.pid
LOG_FILE="$LOG_DIR"/webserver.log
PORT=8888
RUN_USER=vagrant
@gene1wood
gene1wood / all_aws_lambda_modules_python.md
Last active May 7, 2024 11:49
AWS Lambda function to list all available Python modules for Python 2.7 3.6 and 3.7
@diegopacheco
diegopacheco / go-install.md
Last active August 12, 2019 19:40
How to Install GO Lang on CentOS / Amazon Linux?

How to Install GO Lang on CentOS / Amazon Linux?

sudo wget https://storage.googleapis.com/golang/go1.4.2.linux-amd64.tar.gz
tar -xzf go1.4.2.linux-amd64.tar.gz 
export GOROOT=PATH_WHERE_YOU_EXTRACT_GO
export PATH=$PATH:$GOROOT/bin 
export GOBIN=$GOROOT/bin 
mkdir ~/golang/ 
export GOPATH=~/golang/