Skip to content

Instantly share code, notes, and snippets.

View DevoKun's full-sized avatar

Devon Hubner DevoKun

View GitHub Profile
@DevoKun
DevoKun / kafka.md
Created July 13, 2018 02:52
How to operate Kafka, mostly using Docker

Kafka Distributed Streaming Platform

Publish and Subscribe / Process / Store

Start Kafka

  • Kafka uses ZooKeeper as a distributed backend.

Start Zookeeper

@DevoKun
DevoKun / deploy_gitlab_using_docker.md
Created July 9, 2019 21:16
Deploy GitLab using Docker

PostgreSQL and Redis

  • Gitlab CE uses Redis to store user sessions and a task queue.
  • GitLab CE uses PostgreSQL as its database back end.

Start PostgreSQL Docker Container

docker run -d --name postgresql \
@DevoKun
DevoKun / gather_facts_from_azure_vm_metadata.yaml
Last active September 21, 2022 06:02
Ansible Gather Facts from Azure VM Metadata
---
- hosts: localhost
pre_tasks:
- name: "apt install curl"
apt:
name: curl
state: latest
@DevoKun
DevoKun / change_github_master_branch_name.sh
Last active June 28, 2022 20:38
Change GitHub Master branch name to Main
git pull # Pull first or lose ANY commits upstream
git branch -m master main # Rename branch locally
echo
echo "Change GitHub default branch to 'main'."
echo
echo "Is GitHub Default Branch 'main'?"
echo
read -p "Press ENTER to continue"
echo
@DevoKun
DevoKun / redis_notes.rb
Created July 9, 2019 19:34
Using Redis with Ruby
#!/usr/bin/env ruby
require 'redis'
# gem install redis
##
## Connect to DB
##
redis = Redis.new(host: "localhost")
@DevoKun
DevoKun / GitTricks.md
Last active October 3, 2021 01:45
Git Tricks I use stored in a handy place

undo git rm $FILENAME or git add -A

##
## Restore the file status in the index
##
git reset -- <file>

##
## check out a copy from the index
@DevoKun
DevoKun / Deploy_go_application_to_Elastic_Beanstalk.md
Created November 25, 2017 03:56
How to deploy GO applications to Elastic Beanstalk without or with Docker

Deploy go application to Elastic Beanstalk

non-Docker Elastic Beanstalk GO

@DevoKun
DevoKun / aws_iam_secret_to_smtp_password.md
Created January 30, 2020 23:04 — forked from damusix/aws_iam_secret_to_smtp_password.md
Convert AWS IAM credentials to AWS SMTP credentials

Convert AWS IAM credentials to AWS SMTP credentials

If you do, or want to, use AWS to deploy your apps, you will end up using AWS SES via SMTP when you're launching an app that sends out emails of any kind (user registrations, email notifications, etc). For example, I have used this configuration on various Ruby on Rails apps, however, it is just basic SMTP configurations and crosses over to any framework that supports SMTP sendmail.

There are two ways to go about this:

Luckily, you found this MD file and the NOT SO EASY WAY is suddenly copy-pasta... sudo yum....

@DevoKun
DevoKun / apache-qliksense-proxy.md
Created March 4, 2016 16:32
Apache2 Proxy Server Recipe for QlikSense to accomodate https and Secure WebSocket (wss) connections

Scenario

-------------       ----------------       ---------
| Browser   |<----->| Apache httpd |<----->| Qlik  |
|           |  SSL  |     2.4.9    |  SSL  | Sense |
-------------       ----------------       ---------

Neo4j

Install Java

Neo4j requires at least OpenJDK 8.

apt update ; apt install -y default-jre default-jre-headless