Skip to content

Instantly share code, notes, and snippets.

View thehar's full-sized avatar

Harley Alaniz thehar

View GitHub Profile
@thehar
thehar / docker_debian.md
Created November 9, 2023 13:40 — forked from bndw/docker_debian.md
How to install an older version of Docker on Debian
### Keybase proof
I hereby claim:
* I am thehar on github.
* I am harleycelonis (https://keybase.io/harleycelonis) on keybase.
* I have a public key ASCa_a6Br6RqkdfOtAnbWYNPfM-LZwfPCCxh1os2tlkcXQo
To claim this, I am signing this object:
kubectl get services # List all services
kubectl get pods # List all pods
kubectl get nodes -w # Watch nodes continuously
kubectl version # Get version information
kubectl cluster-info # Get cluster information
kubectl config view # Get the configuration
kubectl describe node <node> # Output information about a node
kubectl get pods # List the current pods
kubectl describe pod <name> # Describe pod <name>
kubectl get rc # List the replication controllers
@thehar
thehar / chefdk-rvm.sh
Last active September 29, 2018 01:26 — forked from asnodgrass/chefdk-rvm.sh
Making ChefDK work with RVM
brew cask install chef/chef/chefdk
CHEFDK="/opt/chefdk/embedded"
CHEFDK_USER="$HOME/.chefdk/gem/ruby/2.5.0"
RVM_GEMS="$HOME/.rvm/gems"
RVM_RUBIES="$HOME/.rvm/rubies"
RUBY_NAME="ext-chefdk-ruby"
mkdir -p $RVM_RUBIES/$RUBY_NAME
ln -s $CHEFDK/bin $RVM_RUBIES/$RUBY_NAME
@thehar
thehar / slack_leave_channels_mass.rb
Created February 2, 2017 19:16
Remove yourself from Slack channels en-masse
#
# Slack hack:: slack_leave_channels_mass
# Description:: Remove yourself from IM-channels in mass
require "slack"
require "progress_bar"
class Array
include ProgressBar::WithProgress
end
@thehar
thehar / codeship-ami-builder.py
Created December 5, 2017 18:10 — forked from rosstimson/codeship-ami-builder.py
Scheduled Lambda that uses the Codeship API in order to trigger a build.
import boto3
import http.client
import json
import logging
import os
from base64 import b64decode
conn = http.client.HTTPSConnection("api.codeship.com")
payload = "{}"
@thehar
thehar / remote_pairing_setup.md
Created December 22, 2015 18:06 — forked from alvarobp/remote_pairing_setup.md
Setting up a remote pair station with SSH + TMUX and/or Reverse SSH Tunnel

Disclaimer: The following examples try to give an overview of the process followed in different scenarios. Some commands were actually written from memory. Some tools might exist simplifying all this. Furthermore, I'm no expert so if anyone ever reads this and knows any improvement, please let me know.

Case 1: Direct access to Pairing Station

Given that the Guest User can access the Pairing Station directly, either because the station is publicly available or because NAT port forwarding can be used, there's only one thing we need to do, give ssh access to the Guest User by adding his ssh public key to our Local User (pair) .ssh/authorized_keys file.

The local user would open up a tmux session with

tmux new-session -s pairing
@thehar
thehar / .kitchen.yml
Last active December 15, 2017 14:05
Add forwarded port to kitchen yaml
---
driver:
network:
- ["forwarded_port", {guest: 80, host: 8080}]
- ["private_network", {ip: "192.168.33.33"}]
@thehar
thehar / tmux-cheatsheet.markdown
Created August 7, 2017 23:23 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
#!/bin/sh
# Stop all containers
docker stop $(docker ps -a -q)
# Delete all containers
docker rm $(docker ps -a -q)
# Delete all images
docker rmi $(docker images -q)