Skip to content

Instantly share code, notes, and snippets.

View mbigras's full-sized avatar

Max Bigras mbigras

View GitHub Profile
@huytd
huytd / wordle.md
Last active March 17, 2024 20:51
Wordle in less than 50 lines of Bash

image

How to use:

./wordle.sh

Or try the unlimit mode:

Running Unifi Controller in systemd-nspawn with cloud-init

This uses Ubuntu's server cloud image as a stateless container to run the UBNT Unifi Controller software. Configuration data is stored in a directory outside the container. Cloud-init is used to automatically set up the container image, so a new version can be dropped in with minimal effort. This should work with pretty much any modern Linux distro with systemd.

Setup

Systemd-nspawn prefers to store its machines on btrfs, so if your /var/lib/machines is not currently btrfs, you should create one and mount it there. Otherwise it will automatically create an image file at /var/lib/machines.raw and mount it.

Create a device

@carlochess
carlochess / main.tf
Created December 18, 2018 15:35
aws batch terraform example
## Make sure your Subnet has internet access
variable "subnet" {}
variable "vpc" {}
provider "aws" {
region = "us-east-1"
}
data "aws_vpc" "sample" {
id = "${var.vpc}"
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active April 19, 2024 06:11
set -e, -u, -o, -x pipefail explanation
@blackgear
blackgear / clock.swift
Last active April 20, 2023 15:41
A simple floating clock for OS X
// The MIT License
// Copyright (c) 2018 Daniel
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
@subfuzion
subfuzion / install-docker-ubuntu.md
Last active September 26, 2023 08:20
Installing Docker on Ubuntu

Installing with apt-get

#!/bin/sh
# https://docs.docker.com/engine/installation/linux/ubuntu/#install-using-the-repository
sudo apt-get update && sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88 | grep docker@docker.com || exit 1
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update

How to add an image to a gist

  1. Create a gist if you haven't already.
  2. Clone your gist:
    # make sure to replace `<hash>` with your gist's hash
    git clone https://gist.github.com/<hash>.git # with https
    git clone git@gist.github.com:<hash>.git     # or with ssh
@sj26
sj26 / LICENSE.md
Last active March 8, 2024 18:31
Bash retry function

This is free and unencumbered software released into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.

In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit

@math2001
math2001 / minimap_setting.py
Last active August 14, 2021 17:34
A plugin to hide the minimap using a setting on sublime text.
# -*- encoding: utf-8 -*-
import sublime
import sublime_plugin
class MinimapSetting(sublime_plugin.EventListener):
def on_activated(self, view):
show_minimap = view.settings().get('show_minimap')
if show_minimap:
@binary1230
binary1230 / wells fargo website bulk statement downloader
Last active November 14, 2023 02:22
wells fargo ability to download all bank statements
3/18/2021: WE HAVE MOVED: For the latest instructions on how to use the bulk wells fargo PDF downloader,
please ignore this page and visit below:
https://github.com/binary1230/wellsfargo-bulk-PDF-statement-downloader/blob/main/README.md