Skip to content

Instantly share code, notes, and snippets.

View antoineco's full-sized avatar
📝
1 %a "[No Name]"

Antoine Cotten antoineco

📝
1 %a "[No Name]"
View GitHub Profile
@Mikulas
Mikulas / main.go
Created December 27, 2021 23:53
fitbod to hevy import export sync
package main
import (
"bytes"
"encoding/csv"
"encoding/json"
"fmt"
"io/ioutil"
"log"
"net/http"
@lukasnellen
lukasnellen / README.md
Last active August 23, 2023 18:05
Connect host and VM when using MACVTAP instead of TAP interfaces

Connect host and VM when using a MACVTAP interface

NB: The following is only of interest if you want to share the host network with your virtual machine. The most common way this gets implemented is by setting up a bridge which includes the physical interface. Using a [MACVTAP] inerface is suposed to be more efficient, since it avoids the additional bridge in the network setup.

In this gist, we extend the information provided in the documenation on linux virtual interfaces.

In the following, we assume you host interface is eth0. IP addresses used:

  • host: 198.51.100.50/24
  • virtual machine: 198.51.100.198/24
  • default gateway: 198.51.100.254
@carolynvs
carolynvs / .gitconfig
Last active October 19, 2022 14:44
git wip - Show what branches you have been working on lately
[alias]
wip = for-each-ref --sort='authordate:iso8601' --format=' %(color:green)%(authordate:relative)%09%(color:white)%(refname:short)' refs/heads
@juliostanley
juliostanley / README.md
Last active July 24, 2022 18:20
K3S and Rio on WSL2

Install Rio on K3S running in WSL2 on Windows

Info

  • K3S is a certified kubernetes distro for edge and other scenarios
  • Rio simplifies application development on kubernetes
  • WSL2 run linux on windows, nicer and more integrated than a traditional vm on hyper-v

Prerequisites

  • Windows 10 with WSL2 set as default
@bbqtd
bbqtd / macos-tmux-256color.md
Last active April 24, 2024 01:28
Installing tmux-256color for macOS

Installing tmux-256color for macOS

  • macOS 10.15.5
  • tmux 3.1b

macOS has ncurses version 5.7 which does not ship the terminfo description for tmux. There're two ways that can help you to solve this problem.

The Fast Blazing Solution

Instead of tmux-256color, use screen-256color which comes with system. Place this command into ~/.tmux.conf or ~/.config/tmux/tmux.conf(for version 3.1 and later):

{
"background" : "#1d2021",
"black" : "#665C54",
"blue" : "#7DAEA3",
"brightBlack" : "#928374",
"brightBlue" : "#7DAEA3",
"brightCyan" : "#89B482",
"brightGreen" : "#A9B665",
"brightPurple" : "#D3869B",
"brightRed" : "#EA6962",
@fnky
fnky / ANSI.md
Last active April 26, 2024 16:45
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@RRethy
RRethy / gist:ad8a9a3b1112a48226ec3336fa981224
Last active April 21, 2024 03:40
Seamlessly editing remote files in (Neo)Vim with Netrw and scp

Seamlessly editing remote files in (Neo)Vim with Netrw and scp

Neovim and Vim both come bundled with a standard plugin called Netrw. Netrw acts a file explorer (similar to NERDTree), but more importantly has the ability to work with scp (as well as sftp, rcp, ftp, and lots of others :h netrw-nread) to let you edit files and browse directories that are hosted on a remote machine, inside of your local Vim instance.

This is useful since you are able to use your Vim setup and plugins without copying over your dotfiles to the remote machine. As well, since the file is copied to your local machine, there will be no delay when typing.

Setup

This is optional for Vim, but required for Neovim (check this Neovim issue explaining why).

@seanh
seanh / html_tags_you_can_use_on_github.md
Last active April 25, 2024 23:03
HTML Tags You Can Use on GitHub

HTML Tags You Can Use on GitHub

Wherever HTML is rendered on GitHub (gists, README files in repos, comments on issues and pull requests, ...) you can use any of the HTML elements that GitHub Flavored Markdown (GFM) provides syntactic sugar for. You can either use the syntactic sugar that GFM (or other GitHub-supported markup language you're using) provides or, since Markdown can contain raw HTML, you can enter the HTML tags manually.

But GitHub also allows you to use a few HTML elements beyond what Markdown provides by entering the tags manually, and some of them are styled with CSS. Most raw HTML tags get stripped before rendering the HTML. Those tags that can be generated by GFM syntactic sugar, plus a few more, are whitelisted. These aren't documented anywhere that I can find. Here's what I've discovered so far:

<details> and <summary>

A `<detai