Skip to content

Instantly share code, notes, and snippets.

View omerxx's full-sized avatar
🎱
All is as thinking makes it so

Omer H. omerxx

🎱
All is as thinking makes it so
View GitHub Profile
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "Launch OpenVPN Server in an existing Virtual Private Cloud (VPC).",
"Parameters": {
"InstanceType": {
"Description": "Instance type for OpenVPN Server",
"Type": "String",
"Default": "c4.large",
"AllowedValues": [
"t2.micro",
class Mytool < Formula
desc "It does this and that"
homepage "https://github.com/myaccount/mytool"
url "https://github.com/myaccount/mytool/releases/download/v0.1.1/mytool.tar.gz"
sha256 "<SHA256>"
def install
bin.install "fed"
end
class Mytool < Formula
desc "Some description"
homepage "https://github.com/myrepo/mytool"
url ".../mytool-darwin-amd64.tar.gz", :using => GitHubPrivateRepositoryReleaseDownloadStrategy
sha256 "<SHA256 CHECKSUM>"
head "https://github.com/myrepo/mytool.git"
def install
bin.install "mytool"
end

Keybase proof

I hereby claim:

  • I am omerxx on github.
  • I am omerxx (https://keybase.io/omerxx) on keybase.
  • I have a public key ASDPCc-UmxT2aD-W_Zla9l0gkt_U0wFaCixEaCsFsWj8dwo

To claim this, I am signing this object:

version: "3"
services:
vote:
image: prodopsio/vote
command: python app.py
ports:
- "5000:80"
networks:
- exlibris
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
name: kubernetes-dashboard
labels:
k8s-app: kubernetes-dashboard
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
apiVersion: The chart API version, always "v1" (required)
name: The name of the chart (required)
version: A SemVer 2 version (required)
kubeVersion: A SemVer range of compatible Kubernetes versions (optional)
description: A single-sentence description of this project (optional)
keywords:
- A list of keywords about this project (optional)
home: The URL of this project's home page (optional)
sources:
- A list of URLs to source code for this project (optional)
@omerxx
omerxx / certbot.sh
Last active February 26, 2021 14:12
# Generating let's encrypt manual cert with ease
# Usage: ./cert.sh me@company.com my.domain.com
# Output: ~/certbot/.certbot/config
#
generate_certificate() {
email=$1
domain=$2
sudo docker run -it --rm -v ~/certbot:/home/root \
certbot/certbot certonly --config-dir /home/root/.certbot/config \
--logs-dir /home/root/.certbot/logs \
#!/bin/bash
# Setting a defaults
ECR_REG=${ECR_REG:-000.dkr.ecr.cn-northwest-1.amazonaws.com.cn}
CHINA=${CHINA:-false}
# Changing registries to Chinese accessible mirrors
#
set_china_environment() {
@omerxx
omerxx / tags.py
Created July 10, 2019 09:33
Getting EC2 instance tags from within the instance
import boto3
import requests
def _get_metadata_region():
r = requests.get(
'http://169.254.169.254/latest/dynamic/instance-identity/document')
return r.json()['region']