Skip to content

Instantly share code, notes, and snippets.

@fevangelou
fevangelou / Software RAID 1 setup on Ubuntu Server 20.04.md
Last active March 1, 2024 01:02
Software RAID 1 setup on Ubuntu Server 20.04 (or newer)

Looking to create a Software RAID 1 setup for your 2-disk server on Ubuntu Server 20.04?

Screen Shot 2020-06-05 at 20 55 31

Let's start with the basics: the official guide by Ubuntu (https://ubuntu.com/server/docs/install/storage) is outdated/wrong. And as of March 2021 it's possible that there's a bug as well with how the bios_grub partitions are created when using multiple disks.

Now on to the solution:

  • Select "Custom storage layout" when you reach the storage configuration step of the installer.
  • If the disks have existing partitions, click on each disk under AVAILABLE DEVICES and then select REFORMAT. This will (temporarily) wipe out the partitions.
@IanColdwater
IanColdwater / twittermute.txt
Last active April 22, 2024 17:26
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@haproxytechblog
haproxytechblog / haproxy-config-2-1.cfg
Created December 2, 2019 23:22
HAProxy 2.1 Sample Config
#
# This is the ultimate HAProxy 2.0 "Getting Started" config
# It demonstrates many of the features available which are now available
# While you may not need all of these things, this can serve
# as a reference for your own configurations.
#
# Have questions? Check out our community Slack:
# https://slack.haproxy.org/
#
@stevecohenfr
stevecohenfr / .python-gsmmodem-advanced.md
Last active January 26, 2024 10:20
Read long SMS with python-gsmmodem (and send SMS with same running script)

Read long SMS with python-gsmmodem (and send SMS with same running script)

I spend a lot of time to replace gammu with python-gsmmodem for my Huawei E3531.

The python exemple is just an exemple, it's incomplete. It does not read sms in the memory (if you receive a sms before starting the script). And it does not concat multiple parts sms (it will print unordered parts).
Also, as your live read sms script is running, you cannot send sms with another script because the dongle is busy.

Here is my own script to read all kind of SMS and send in same time.

@haproxytechblog
haproxytechblog / haproxy-config-2-0.cfg
Created June 13, 2019 20:41
HAProxy 2.0 configuration
#
# This is the ultimate HAProxy 2.0 "Getting Started" config
# It demonstrates many of the features available which are now available
# While you may not need all of these things, this can serve
# as a reference for your own configurations.
#
# Have questions? Check out our community Slack:
# https://slack.haproxy.org/
#
@maxidorius
maxidorius / notes.md
Last active November 16, 2023 00:05
Notes on privacy and data collection of Matrix.org

Notes on privacy and data collection of Matrix.org


This version of the document is no longer canonical. You can find the canonical version hosted at Gitlab and Github.

PART 2 IS OUT, INCLUDING THE DISCLOSURE OF A GLOBAL FEDERATION DATA LEAK, AND THE ANATOMY OF A GDPR DATA REQUEST HANDLED BY MATRIX.ORG. SEE THE REPOS ABOVE.

@CalvinHartwell
CalvinHartwell / ubuntu-18.04-lts-preseed.cfg
Last active December 10, 2021 19:48
ubuntu-18.04-lts-preseed.cfg
### Preseed for Ubuntu 18.04
# Derived from: https://help.ubuntu.com/lts/installation-guide/example-preseed.txt
### Usage
# We recommend to use the build-iso.sh script to build an image with embedded
# preseed and other required files. In that case the preseed file gets loaded
# automatically and all additional files are available to the installer.
### Unattended Installation
d-i auto-install/enable boolean true
@munificent
munificent / generate.c
Last active May 1, 2024 20:06
A random dungeon generator that fits on a business card
#include <time.h> // Robert Nystrom
#include <stdio.h> // @munificentbob
#include <stdlib.h> // for Ginny
#define r return // 2008-2019
#define l(a, b, c, d) for (i y=a;y\
<b; y++) for (int x = c; x < d; x++)
typedef int i;const i H=40;const i W
=80;i m[40][80];i g(i x){r rand()%x;
}void cave(i s){i w=g(10)+5;i h=g(6)
+3;i t=g(W-w-2)+1;i u=g(H-h-2)+1;l(u
@papamoose
papamoose / _INSTALL.md
Last active October 1, 2019 16:38 — forked from robinsmidsrod/_INSTALL.md
Bootstrapping full iPXE native menu with customizable default option with timeout (also includes working Ubuntu 12.04 preseed install)

Add the following chunk to your existing ISC dhcpd.conf file.

if exists user-class and ( option user-class = "iPXE" ) {
    filename "http://boot.smidsrod.lan/boot.ipxe";
}
else {
    filename "undionly.kpxe";
}

(or see https://gist.github.com/4008017 for a more elaborate setup

@dandanwei
dandanwei / osx_egpu_pytorch_fastai.md
Last active February 16, 2023 10:22
Make Nvidia EGPU working on mac os with Pytorch and Fast.ai

[Updated on 2018.11.14] I finally made my GTX1070 working with my MBP for Pytorch and fast.ai. Below are the steps:

Environment

  • MacBook Pro (15-inch, 2016) with touch bar
  • OSX version: 10.13.6 (Mojave may not work yet as of now)
  • eGPU: Razer Core X + GTX 1070 (MSI)

Steps 1: Install Nvidia Web Driver