Skip to content

Instantly share code, notes, and snippets.

View bryanasdev000's full-sized avatar

Bryan A. S. bryanasdev000

View GitHub Profile

Installing on Linode

There are now official docs, so follow those as they'll be up-to-date and easier to follow.

Click here to view the old directions

Installing on Linode

This work, excluding the Arch Linux logo, is made available under CC0: https://creativecommons.org/publicdomain/zero/1.0/
@LnL7
LnL7 / configuration.nix
Last active April 7, 2024 01:08
NixOS configuration overlays
{ config, pkgs, ... }:
let
# Import unstable channel.
# sudo nix-channel --add http://nixos.org/channels/nixpkgs-unstable nixpkgs-unstable
# sudo nix-channel --update nixpkgs-unstable
unstable = import <nixpkgs-unstable> {};
in
{
@galexrt
galexrt / node_exporter.sh
Last active February 26, 2024 20:33
Simple Prometheus node_exporter install script (Updated for 1.0.1)
#!/bin/bash
version="${VERSION:-1.0.1}"
arch="${ARCH:-linux-amd64}"
bin_dir="${BIN_DIR:-/usr/local/bin}"
wget "https://github.com/prometheus/node_exporter/releases/download/v$version/node_exporter-$version.$arch.tar.gz" \
-O /tmp/node_exporter.tar.gz
mkdir -p /tmp/node_exporter

Docker Swarm with Macvlan, Consul and Autoscaling

TL;DR:

This will get you routable containers with IPs on your existing subnets, advertising to Consul. They will also be scalable and placed across a cluster of Swarm hosts. It's assumed that you are already running Consul, so if not, there are a ton of tutorials out there. It's also assumed you know how to install Docker and various Linux kernels.

Bonus: We add an autoscaling API called Orbiter (https://gianarb.it/blog/orbiter-the-swarm-autoscaler-moves).

I just want to run containers, like now, on my existing infrastructure and networks!

So you have an existing environment. You use Consul for service discovery. Life is good. Containers are now a thing and you want to work them in without having to worry about overlay networking or reverse proxies. You also don't want to add extra latency (as some naysayers could use it as fuel to kill your hopes and dreams). Lastly, you don't have a lot of time to invest in a complex orchestration tool, such a

@saghul
saghul / stream.js
Last active September 27, 2023 02:40
Streaming a webcam to a Jitsi Meet room
const puppeteer = require('puppeteer');
// Streams the first webcam in the system to the specified Jitsi Meet room. Audio is currently
// not sent, but it can be easily enabled by disabling the corresponding setting in `meetArgs`.
//
// TODO
// - Detect if we are kicked from the room
// - Support authenticated deployments
//
@joyeusenoelle
joyeusenoelle / Mastodon.md
Last active January 23, 2024 02:43
An increasingly less-brief introduction to Mastodon
@tintoy
tintoy / td-agent.Dockerfile
Created November 15, 2017 04:24
Fluentd on Kubernetes for ASP.NET Core logging (via Serilog)
FROM gcr.io/google_containers/fluentd-elasticsearch:1.22
RUN apt-get update && \
apt-get install -y --no-install-recommends make gcc g++ libc6-dev ruby-dev && \
td-agent-gem install fluent-plugin-concat --version '~>1.0.0' --no-ri --no-rdoc && \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false make gcc g++ libc6-dev ruby-dev
# Copy the Fluentd configuration file for concatenating lines in docker logs.
COPY td-agent.conf /etc/td-agent/td-agent.conf
@molotovbliss
molotovbliss / terminalrc
Created December 14, 2017 08:41
Dracula Theme for XFCE4 Terminal
ColorBackground=#28282a2a3636
ColorForeground=#f8f8f8f8f2f2
ColorSelection=#363639394848
ColorBold=#f4f47676c3c3
ColorCursor=#5050fafa7b7b
TabActivityColor=#5050fafa7b7b
ColorPalette=#000000000000;#9a9a40404646;#90907979b3b3;#929298986363;#3d3d98985a5a;#9a9a53538282;#3a3a4d4d5b5b;#8bfc8bfc8ccc;#4d4d4d4d4d4d;#ffff55555555;#cacaa9a9fafa;#f1f1fafa8c8c;#5050fafa7b7b;#ffff7979c6c6;#8b8be9e9fdfd;#f8f8f8f8f2f2
ColorSelectionUseDefault=FALSE
ColorBoldUseDefault=FALSE
@ruzickap
ruzickap / packer_qemu_windows_ansible_winrm.sh
Last active March 21, 2023 23:26
Quick and Dirty script building Windows using Packer + Ansible + WinRM on QEMU (libvirt)
#!/bin/bash -x
mkdir test
cd test
curl https://raw.githubusercontent.com/ruzickap/packer-templates/master/http/windows-server-2016/Autounattend.xml | sed '/.*Microsoft-Windows-PnpCustomizationsWinPE.*/,/component>/d' > Autounattend.xml
wget -c https://raw.githubusercontent.com/ruzickap/packer-templates/master/scripts/win-common/fixnetwork.ps1
test -f packer || ( wget https://releases.hashicorp.com/packer/1.2.0/packer_1.2.0_linux_amd64.zip && unzip packer_1.2.0_linux_amd64.zip && rm packer_1.2.0_linux_amd64.zip )