Skip to content

Instantly share code, notes, and snippets.

View christianh814's full-sized avatar
😀

Christian Hernandez christianh814

😀
View GitHub Profile

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@roadrunner2
roadrunner2 / 0 Linux-On-MBP-Late-2016.md
Last active February 29, 2024 16:29
Linux on MacBook Pro Late 2016 and Mid 2017 (with Touchbar)

Introduction

This is about documenting getting Linux running on the late 2016 and mid 2017 MPB's; the focus is mostly on the MacBookPro13,3 and MacBookPro14,3 (15inch models), but I try to make it relevant and provide information for MacBookPro13,1, MacBookPro13,2, MacBookPro14,1, and MacBookPro14,2 (13inch models) too. I'm currently using Fedora 27, but most the things should be valid for other recent distros even if the details differ. The kernel version is 4.14.x (after latest update).

The state of linux on the MBP (with particular focus on MacBookPro13,2) is also being tracked on https://github.com/Dunedan/mbp-2016-linux . And for Ubuntu users there are a couple tutorials (here and here) focused on that distro and the MacBook.

Note: For those who have followed these instructions ealier, and in particular for those who have had problems with the custom DSDT, modifying the DSDT is not necessary anymore - se

@smurugap
smurugap / virt-install
Created March 11, 2018 21:04
Virt Install to start a VM with macvtap interface
virt-install \
--name=centos-compute-$i \
--ram=32768 \
--vcpus=16 \
--cpu host-model-only \
--os-type linux \
--os-variant centos7.0 \
--import \
--disk path=/var/lib/libvirt/images/centos74-compute-$i.qcow2,bus=virtio,cache=none,format=qcow2,bus=virtio \
--network type=direct,source=enp6s0f0,source_mode=bridge,model=virtio \
@yanniszark
yanniszark / split_yaml.go
Created April 15, 2020 11:54
Golang: Multiple YAML Documents / Split YAML
import goyaml "github.com/go-yaml/yaml"
func SplitYAML(resources []byte) ([][]byte, error) {
dec := goyaml.NewDecoder(bytes.NewReader(resources))
var res [][]byte
for {
var value interface{}
err := dec.Decode(&value)
@devinodaniel
devinodaniel / gist:8f9b8a4f31573f428f29ec0e884e6673
Created November 21, 2017 20:18
Generate SSH RSA Private/Public Key pair with Golang
// This shows an example of how to generate a SSH RSA Private/Public key pair and save it locally
package main
import (
"crypto/rand"
"crypto/rsa"
"crypto/x509"
"encoding/pem"
"golang.org/x/crypto/ssh"
#! /usr/bin/env/sh
#
# this script has not been tested nor validated, it is not, in any way
# supported by Red Hat or NetApp. use at your own risk.
#
#
# the purpose of this script is to create an OpenShift MachineConfig
# to apply the NetApp recommended OS configuration to RHCOS machines.
@jamcole
jamcole / configurations.yaml
Created March 23, 2020 22:12
Kustomize OCP Objects (configurations)
# https://github.com/kubernetes-sigs/kustomize/blob/master/examples/transformerconfigs/README.md
commonLabels:
# set labels at metadata.labels for all types
- path: metadata/labels
# create metadata.labels if it doesn't exist
create: true
- path: spec/template/metadata/labels
kind: DeploymentConfig
create: true
@scottrigby
scottrigby / readme.md
Last active February 3, 2023 20:12
Introduction to GitOps & The Flux Family of Projects

Introduction to GitOps & The Flux Family of Projects

Set up local cluster and Flux CLI

  1. Install Flux CLI and Kind:

    $ brew reinstall flux kind
    $ kind --version
    kind version 0.11.1
@scottrigby
scottrigby / hands-on-gitops-patterns-for-helm-users.md
Last active December 27, 2022 18:12
Hands-On GitOps Patterns for Helm Users

Hands-On GitOps Patterns for Helm Users

  1. Install Flux CLI and Kind:

    $ brew reinstall flux kind
    $ kind --version
    kind version 0.10.0
    $ flux --version
    flux version 0.9.1