Skip to content

Instantly share code, notes, and snippets.

View naeemark's full-sized avatar
🎯
Focusing

Naeem naeemark

🎯
Focusing
View GitHub Profile
@ronakmutha
ronakmutha / docker_clone_volume.sh
Created December 23, 2020 04:28
Shell script to clone docker volumes
#!/bin/bash
#Script that can clone a given volume
#Verify user entered arguments
if [ "$1" = "" ]
then
echo "Provide a source volume name that needs to be cloned"
exit
fi
@bayu-code-lab
bayu-code-lab / beanstalk_deploy.py
Created January 11, 2020 12:47
CI/CD Django Bitbucket to AWS Elastic Beanstalk
"""
A Bitbucket Builds template for deploying
an application to AWS Elastic Beanstalk
joshcb@amazon.com
v1.0.0
"""
from __future__ import print_function
import os
import sys
from time import strftime, sleep
@pahud
pahud / main.workflow
Last active July 24, 2023 08:20
Github Actions with Amazon EKS CI/CD
workflow "Demo workflow" {
on = "push"
resolves = ["SNS Notification"]
}
action "Build Image" {
uses = "actions/docker/cli@c08a5fc9e0286844156fefff2c141072048141f6"
runs = ["/bin/sh", "-c", "docker build -t $IMAGE_URI ."]
env = {
IMAGE_URI = "xxxxxxxx.dkr.ecr.ap-northeast-1.amazonaws.com/github-action-demo:latest"
@jincod
jincod / bitbucket-pipelines.yml
Created October 6, 2018 15:52
Docker deployment using Bitbucket Pipelines and Heroku
pipelines:
default:
- step:
name: build and publish docker image
services:
- docker
caches:
- docker
script:
- docker build -t $APP_NAME .
@dideler
dideler / bot.rb
Last active April 17, 2024 08:40
Sending a notification message to Telegram using its HTTP API via cURL
# Use this script to test that your Telegram bot works.
#
# Install the dependency
#
# $ gem install telegram_bot
#
# Run the bot
#
# $ ruby bot.rb
#
@simonw
simonw / redis-docker-for-mac.md
Last active August 11, 2022 16:10
How to run a redis server using Docker-for-Mac

How to run a redis server using Docker-for-Mac

This will work with other flavours of Docker as well.

Run the following command:

docker run --name my-redis -p 6379:6379 --restart always --detach redis

This will download and run redis, set to auto-restart when your machine starts and bound to port 6379 on your machine.

# rc4 encryption
# modified from source: https://github.com/bozhu/RC4-Python/blob/master/rc4.py
import sys
def crypt(key, data):
S = list(range(256))
j = 0
@swankjesse
swankjesse / MoshiKotlinExample.kt
Created May 14, 2017 17:15
Demo how to use Moshi with Kotlin
import com.squareup.moshi.Json
import com.squareup.moshi.KotlinJsonAdapterFactory
import com.squareup.moshi.Moshi
import com.squareup.moshi.Rfc3339DateJsonAdapter
import java.util.Date
val json = """
{
"url": "https://api.github.com/repos/square/okio/issues/156",
"id": 91393390,
@karstenmueller
karstenmueller / aws_az_list.md
Created December 1, 2016 18:26
List of AWS availability zones for each AWS region

AWS Regions

Region Code Region Name Availability Zones
us-east-1* N. Virginia us-east-1a us-east-1b us-east-1c us-east-1d us-east-1e
us-east-2 Ohio us-east-2a us-east-2b us-east-2c
us-west-1* N. California us-west-1a us-west-1b us-west-1c
us-west-2 Oregon us-west-2a us-west-2b us-west-2c
eu-west-1 Ireland eu-west-1a eu-west-1b eu-west-1c
eu-central-1 Frankfurt eu-central-1a eu-central-1b
@ultraon
ultraon / build.gradle
Last active August 19, 2020 18:10
Good example of the merged Jacoco code covarage Gradle configuration
apply plugin: 'com.android.application'
apply from: "$rootDir/coverage.gradle"
//...
android {
//...
buildTypes {
//...
debug {