Skip to content

Instantly share code, notes, and snippets.

View david-bergstrom's full-sized avatar

David Bergström david-bergstrom

View GitHub Profile
@srijan
srijan / docker_setup.yml
Last active February 10, 2024 04:17
Install docker and docker-compose using ansible https://srijan.ch/install-docker-and-docker-compose-using-ansible
---
- name: Install packages using apt
apt:
name:
- apt-transport-https
- ca-certificates
- curl
- gnupg2
- software-properties-common
state: present
This work, excluding the Arch Linux logo, is made available under CC0: https://creativecommons.org/publicdomain/zero/1.0/

There are three easy to make mistakes in go. I present them here in the way they are often found in the wild, not in the way that is easiest to understand.

All three of these mistakes have been made in Kubernetes code, getting past code review at least once each that I know of.

  1. Loop variables are scoped outside the loop.

What do these lines do? Make predictions and then scroll down.

func print(pi *int) { fmt.Println(*pi) }
@galou
galou / .ycm_extra_conf.py
Last active April 4, 2022 10:18
YouCompleteMe configuration file for ROS, copy to $ROS_WORKSPACE
# -*- coding: utf-8 -*-
##########################################################################
# YouCompleteMe configuration for ROS #
# Author: Gaël Ecorchard (2015) #
# #
# The file requires the definition of the $ROS_WORKSPACE variable in #
# your shell. #
# Name this file .ycm_extra_conf.py and place it in $ROS_WORKSPACE to #
# use it. #
@mgreensmith
mgreensmith / Slack_solarized_themes
Last active May 2, 2024 18:14
Solarized themes for Slack
Solarized
#FDF6E3,#EEE8D5,#93A1A1,#FDF6E3,#EEE8D5,#657B83,#2AA198,#DC322F
Solarized Dark
#073642,#002B36,#B58900,#FDF6E3,#CB4B16,#FDF6E3,#2AA198,#DC322F