Skip to content

Instantly share code, notes, and snippets.

View phumpal's full-sized avatar
🌮

Patrick Humpal phumpal

🌮
  • Northern California
View GitHub Profile
@MarkBennett
MarkBennett / installing-ruby-2.5.1-on-m1.md
Last active March 23, 2024 10:21
Installing Ruby 2.5 on Mac M1
@phumpal
phumpal / Gemfile
Last active June 23, 2020 03:28
A simple Sinatara app to proxy Airbrake webhooks to Google Hangout Chats
source 'https://rubygems.org'
gem 'hangouts-chat'
gem 'sinatra'
@IanColdwater
IanColdwater / twittermute.txt
Last active April 22, 2024 17:26
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@ssstonebraker
ssstonebraker / elasticsearch_5.6_cheatsheet.md
Last active March 1, 2024 06:04
ElasticSearch 5.6 Cheatsheet

ElasticSearch 5.6 Cheatsheet

Node Decomission

If you need to decomission a node the first thing you should do is transfer all shards from it to other nodes

Start Moving all Shards off a node

This command will tell ElasticSearch to:

  1. Stop sending new shards to node 10.0.0.1
  2. Move all existing shards on node 10.0.0.1 to other nodes in the cluster
# Let's see the indices already in ES
GET _cat/indices
# Setup: delete products index in case it exists
DELETE products
# Create product index
PUT /products
{
"settings" : {
@neomantra
neomantra / High_Performance_Redis.md
Last active February 7, 2024 03:41
Notes on running Redis with HPC techniques

High Performance Redis

In response to this brief blog entry, @antirez tweeted for some documentation on high-performance techniques for Redis. What I present here are general high-performance computing (HPC) techniques. The examples are oriented to Redis. but they work well for any program designed to be single- or worker-threaded and asynchronous (e.g. uses epoll).

The motivation for using these techniques is to maximize performance of our system and services. By isolating work, controlling memory, and other tuning, you can achieve significant reduction in latency and increase in throughput.

My perspective comes from the microcosm of my own bare-metal (vs VM), on-premises deployment. It might not be suitable for all scenarios, especially cloud deployments, as I have little experience with HPC there. After some discussion, maybe this can be adapted as [redis.io documentation](https://redis.io/do

@geerlingguy
geerlingguy / aws-sts-token
Created September 19, 2018 16:05
AWS STS Token update playbook for MFA
#!/usr/bin/env ansible-playbook -c local
#
# AWS STS token update playbook.
#
# Updating AWS session tokens with STS can be a pain. But MFA is good. So let's
# automate the management of the .aws/credentials file to make it not painful!
#
# Usage:
#
# 1. Save this to a file like /usr/local/bin/aws-sts-token
@phumpal
phumpal / README.md
Last active February 21, 2020 20:05
A simple Sinatra app to proxy Airbrake webhooks to Cisco Spark Rooms

Setup

brew install jq # or apt-get install jq (only needed for testing)          
rvm install ruby-2.4.1
rvm gemset create spark
rvm gemset use spark
gem install cisco_spark --no-document
gem install sinatra --no-document
@jschroed91
jschroed91 / installopenssh76.sh
Last active October 3, 2020 08:50
Install openSSH 7.6 on Ubuntu 14.04
#!/bin/bash
echo "Installing deps..."
sudo apt-get install libssl-dev zlib1g-dev libpam0g-dev xz-utils
sudo apt-get remove openssh-server
echo "Downloading and extracting sources..."
wget http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-7.6p1.tar.gz
wget http://www.linuxfromscratch.org/patches/downloads/openssh/openssh-7.6p1-openssl-1.1.0-1.patch
tar -xf openssh-7.6p1.tar.gz
@timvisee
timvisee / falsehoods-programming-time-list.md
Last active April 22, 2024 16:30
Falsehoods programmers believe about time, in a single list

Falsehoods programmers believe about time

This is a compiled list of falsehoods programmers tend to believe about working with time.

Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.

Falsehoods

  • There are always 24 hours in a day.
  • February is always 28 days long.
  • Any 24-hour period will always begin and end in the same day (or week, or month).