Skip to content

Instantly share code, notes, and snippets.

View 7hunderbird's full-sized avatar
👶
Since 1976.

Tyler Bird 7hunderbird

👶
Since 1976.
View GitHub Profile
@slavafomin
slavafomin / git-submodules.md
Last active April 15, 2024 14:11
Git submodules best practices

Git submodules best practices

Useful commands

— Clone repository with submodules automatically:

git clone --recursive git@github.com:name/repo.git

— Initialize submodules after regular cloning:

@kevin-smets
kevin-smets / 1_kubernetes_on_macOS.md
Last active May 5, 2024 10:12
Local Kubernetes setup on macOS with minikube on VirtualBox and local Docker registry

Requirements

Minikube requires that VT-x/AMD-v virtualization is enabled in BIOS. To check that this is enabled on OSX / macOS run:

sysctl -a | grep machdep.cpu.features | grep VMX

If there's output, you're good!

Prerequisites

@gwillem
gwillem / ansible-bootstrap-ubuntu-16.04.yml
Created June 16, 2016 21:59
Get Ansible to work on bare Ubuntu 16.04 without python 2.7
# Add this snippet to the top of your playbook.
# It will install python2 if missing (but checks first so no expensive repeated apt updates)
# gwillem@gmail.com
- hosts: all
gather_facts: False
tasks:
- name: install python 2
raw: test -e /usr/bin/python || (apt -y update && apt install -y python-minimal)
@bgandon
bgandon / bosh-cheatsheet.md
Last active September 25, 2023 15:17 — forked from allomov-altoros/bosh-cheatsheet.md
BOSH CLI cheatsheet

BOSH command line interface cheatsheet

Introduction

Bosh is a powerful tool to install and manage your Cloud Virtual Machine workloads (VMs), referred to as “deployments”. You can find docs on //bosh.io/docs. Consider using bosh create-env tool to install to a Cloud of your choice a new Bosh Director.

Bosh uses a CPI (Cloud Provider Interface) to talk to the underlying IaaS/Cloud and manage Cloud workloads, just like a computer uses a driver to talk to a printer. CPIs are very similar to the Infrastructure Cloud Providers later implemented in the ClusterAPI technology, but Bosh abstractions apply to any scope of workloads where ClusterAPI is very restrictive, and Bosh concepts map the problem space better than ClusterAPI, reaching better efficiency in the convergence loop towards the expected (healthy) state of workloads.

Director, Stemcell, Release, Deployment, Instance, are words that have a very specific meaning in Bosh context, so we capitalize them here.

@7hunderbird
7hunderbird / chef_solo_bootstrap.sh
Last active March 21, 2016 23:23 — forked from ryanb/chef_solo_bootstrap.sh
Bootstrap Chef Solo
#!/usr/bin/env bash
apt-get -y update
apt-get install build-essential zlib1g-dev libssl-dev libreadline-dev libyaml-dev libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev -y
cd /tmp
wget ftp://ftp.ruby-lang.org/pub/ruby/2.3/ruby-2.3.0.tar.gz
tar -xvzf ruby-2.3.0.tar.gz
cd ruby-2.3.0/
./configure --prefix=/usr/local
make
make install
@JonathonReinhart
JonathonReinhart / docker_config_temp.sh
Last active February 19, 2016 18:18
Prevent docker client from saving credentials to disk
#!/bin/sh
# This prevents docker config from persisting to disk.
# Place this file in /etc/profile.d/ to happen automatically at login for all users.
# JRR 2015-12-17
# See:
# https://github.com/docker/docker/issues/10318
# https://github.com/docker/docker/issues/18708
dockercfgdir="/dev/shm/dockercfg-$(id -un)"
@menicosia
menicosia / sg-steps.md
Last active April 16, 2018 05:13
Steps to enable security groups on bosh-lite
  1. cf api https://api.[REPLACE-WITH-YOUR-HAPROXY-IP].xip.io --skip-ssl-validation
  2. cf auth [YOUR CF ADMIN USERNAME] [YOUR CF ADMIN PASSWORD]
  3. Create sg.json file with the following contents:
[
  {
  "protocol": "all",
  "destination": "10.244.4.0-10.254.0.0"
  }
]
@myusuf3
myusuf3 / delete_git_submodule.md
Created November 3, 2014 17:36
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@7hunderbird
7hunderbird / Readme.md
Last active August 29, 2015 13:57
quickest setup of a php machine on a vagrant box

Update Ubuntu

You should already be in the vagrant server with vagrant ssh.

sudo su
apt-get update
apt-get upgrade -y 
exit # root
exit # exit vagrant (to reboot)
#!/bin/bash
#
# DESCRIPTION:
#
# Set the bash prompt according to:
# * the ruby version
# * the branch/status of the current git repository
# * the branch of the current subversion repository
# * the return value of the previous command
#