Skip to content

Instantly share code, notes, and snippets.

View eaconde's full-sized avatar

Eric Conde eaconde

View GitHub Profile
# encrypt.rb
#!/usr/bin/env ruby
require 'openssl'
require 'base64'
public_key_file = 'public.pem';
string = 'Hello World!';
public_key =
@eaconde
eaconde / docker-compose.yml
Created March 10, 2022 08:57 — forked from bocharovf/docker-compose.yml
Complete Jaeger docker-compose deployment with ElasticSearch (oss) and Apache Kafka. Jaeger Query and Kibana to search logs and traces. Monitoring with Prometheus and Grafana.
version: "3"
services:
# Using ElasticSearch as a storage for traces and logs
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch-oss:6.7.1
networks:
- elastic-jaeger
ports:
@eaconde
eaconde / aws-creds.bash
Created May 4, 2021 03:07 — forked from ddgenome/aws-creds.bash
Fetch AWS STS keys and set environment variables
#!/bin/bash
# Fetch 24-hour AWS STS session token and set appropriate environment variables.
# See http://docs.aws.amazon.com/cli/latest/reference/sts/get-session-token.html .
# You must have jq installed and in your PATH https://stedolan.github.io/jq/ .
# Add this function to your .bashrc or save it to a file and source that file from .bashrc .
# https://gist.github.com/ddgenome/f13f15dd01fb88538dd6fac8c7e73f8c
#
# usage: aws-creds MFA_TOKEN [OTHER_AWS_STS_GET-SESSION-TOKEN_OPTIONS...]
function aws-creds () {
local pkg=aws-creds
@eaconde
eaconde / git-pushing-multiple.rst
Created April 14, 2021 03:20 — forked from rvl/git-pushing-multiple.rst
How to push to multiple git remotes at once. Useful if you keep mirrors of your repo.

Pushing to Multiple Git Repos

If a project has to have multiple git repos (e.g. Bitbucket and Github) then it's better that they remain in sync.

Usually this would involve pushing each branch to each repo in turn, but actually Git allows pushing to multiple repos in one go.

If in doubt about what git is doing when you run these commands, just

@eaconde
eaconde / install_diablo2_on_mac.md
Created September 7, 2020 09:04 — forked from whipowill/install_diablo2_on_mac.md
Install Diablo II on Mac OSX

Install Diablo II on Mac OSX

These are the instructions for using Terminal to install the Windows version of the game onto your machine. You can then easily copy the game multiple times for different mods you might want to play.

In this guide you'll end up with:

  • A version of the unadulterated game
  • A single-player install w/ PlugY

Install Wine

# Establish connection
conn = ActiveRecord::Base.connection
# Cycle tables
conn.tables.collect do |t|
# Gather columns
columns = c.columns(t).collect(&:name).select {|x| x.ends_with?("_id" || x.ends_with("_type"))}
# Collect all indexed
indexed_columns = c.indexes(t).collect(&:columns).flatten.uniq
# Identify unindexed
unindexed = columns - indexed_columns
aws lambda list-event-source-mappings --function-name function-name
aws lambda update-event-source-mapping --uuid "uuid-abcd-1234-xxxx" --parallelization-factor 10
# view disks
df -h
# query blocks/lookup available volume
lsblk
# create directory for mounting
sudo mkdir /appl
# convert volume disk type
sudo mkfs -t ext4 /dev/xvdb
# mount directory to volume
sudo mount /dev/xvdb /appl
# view disks
df -h
# query blocks/lookup available volume
lsblk
# create directory for mounting
sudo mkdir /appl
# convert volume disk type
sudo mkfs -t ext4 /dev/xvdb
# mount directory to volume
sudo mount /dev/xvdb /appl
#!/bin/bash
yum -y update
yum install -y ruby aws-cli -y
cd /home/ec2-user
aws s3 cp s3://aws-codedeploy-us-east-1/latest/install . --region us-east-1
chmod +x ./install
./install auto
service codedeploy-agent stop
##adduser username <--- this is only required if you use a username that does not already exist
sed -i 's/""/"ec2-user"/g' /etc/init.d/codedeploy-agent