Skip to content

Instantly share code, notes, and snippets.

View bergerx's full-sized avatar
🙂

Bekir Dogan bergerx

🙂
View GitHub Profile
@posener
posener / go-table-driven-tests-parallel.md
Last active March 7, 2024 16:09
Be Careful with Table Driven Tests and t.Parallel()

Be Careful with Table Driven Tests and t.Parallel()

We Gophers, love table-driven-tests, it makes our unittesting structured, and makes it easy to add different test cases with ease.

Let’s create our table driven test, for convenience, I chose to use t.Log as the test function. Notice that we don't have any assertion in this test, it is not needed to for the demonstration.

func TestTLog(t *testing.T) {
	t.Parallel()
@mshkrebtan
mshkrebtan / webex-ubuntu.md
Last active October 28, 2022 15:23
Run Cisco Webex on 64-bit Ubuntu 16.04

Run Cisco Webex on 64-bit Ubuntu 16.04

With Audio and Screen Sharing Enabled

Enable support for 32-bit executables

Add the i386 architecture to the list of dpkg architectures :

sudo dpkg --add-architecture i386
@ekesken
ekesken / Dockerfile
Last active August 17, 2016 19:35
libnetwork_plugin_issue_60
FROM ubuntu:16.04
RUN apt-get update && apt-get --yes --no-install-recommends install \
curl libltdl7 iptables python-dev git python-setuptools python-pip gcc iproute2
RUN easy_install --upgrade pip
RUN curl -Ok https://apt.dockerproject.org/repo/pool/main/d/docker-engine/docker-engine_1.12.0-0~xenial_amd64.deb
RUN dpkg -i docker-engine_1.12.0-0~xenial_amd64.deb
RUN echo 'DOCKER_OPTS="-D --cluster-store=etcd://localhost:2379"' >> /etc/default/docker
RUN curl -Lk https://github.com/coreos/etcd/releases/download/v2.3.7/etcd-v2.3.7-linux-amd64.tar.gz | tar zx -C /usr/local/
RUN ln -s /usr/local/etcd-v2.3.7-linux-amd64/etcd /usr/local/bin/etcd
@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)
@thomasfr
thomasfr / autossh.service
Last active January 5, 2024 08:11
Systemd service for autossh
[Unit]
Description=Keeps a tunnel to 'remote.example.com' open
After=network.target
[Service]
User=autossh
# -p [PORT]
# -l [user]
# -M 0 --> no monitoring
# -N Just open the connection and do nothing (not interactive)