Skip to content

Instantly share code, notes, and snippets.

View WesleyCh3n's full-sized avatar
😺

WesleyCh3n WesleyCh3n

😺
View GitHub Profile
  • Use curl to get the JSON response for the latest release
  • Use grep to find the line containing file URL
  • Use cut and tr to extract the URL
  • Use wget to download it
curl -s https://api.github.com/repos/jgm/pandoc/releases/latest \
| grep "browser_download_url.*deb" \
| cut -d : -f 2,3 \
| tr -d \" \
@WesleyCh3n
WesleyCh3n / netplan.yaml
Created December 15, 2023 06:26
netplan ip client
network:
version: 2
renderer: NetworkManager
ethernets:
enp0s31f6:
addresses:
- 192.168.11.2/24
nameservers:
addresses:
- 8.8.8.8
@WesleyCh3n
WesleyCh3n / 01-network-manager-all.yaml
Created November 28, 2023 03:26
iptables forwarding (router setting)
# Let NetworkManager manage all devices on this system
network:
version: 2
renderer: NetworkManager
ethernets:
enp4s0:
dhcp4: true
enp5s0:
addresses:
- 192.168.80.1/24
@WesleyCh3n
WesleyCh3n / tmuxv3.2a.sh
Created July 8, 2023 03:41
compile and install tmux v3.2a on ubuntu
#!/usr/bin/env bash
sudo apt install libevent-dev ncurses-dev build-essential bison pkg-config
wget https://github.com/tmux/tmux/releases/download/3.2a/tmux-3.2a.tar.gz
tar -zxf tmux-3.2a.tar.gz
cd tmux-3.2a
./configure
make && sudo make install
@font-face {
font-family: 'VictorMono NF';
src: url('https://raw.githubusercontent.com/ryanoasis/nerd-fonts/master/patched-fonts/VictorMono/Medium/VictorMonoNerdFont-Medium.ttf') format('truetype');
font-style: normal;
font-weight: normal;
}
@font-face {
font-family: 'VictorMono NF';
src: url('https://raw.githubusercontent.com/ryanoasis/nerd-fonts/master/patched-fonts/VictorMono/Italic/VictorMonoNerdFont-Italic.ttf') format('truetype');
@font-face {
font-family: 'VictorMono Nerd Font Mono';
src: url('https://raw.githubusercontent.com/ryanoasis/nerd-fonts/master/patched-fonts/VictorMono/Regular/complete/Victor%20Mono%20Regular%20Nerd%20Font%20Complete%20Mono.ttf') format('truetype');
font-style: normal;
font-weight: normal;
}
@font-face {
font-family: 'VictorMono Nerd Font Mono';
src: url('https://raw.githubusercontent.com/ryanoasis/nerd-fonts/master/patched-fonts/VictorMono/Bold/complete/Victor%20Mono%20Bold%20Nerd%20Font%20Complete%20Mono.ttf') format('truetype');
package main
import (
"fmt"
"strings"
"gopkg.in/ldap.v2"
)
const (
ldapServer = "ad.example.com:389"
@WesleyCh3n
WesleyCh3n / opencv_yolov7_tflite.cpp
Last active September 13, 2022 09:43
Tensorflow Lite (tflite) using cv::Mat as input (Tiny Yolo v7) - C++ / Python
#include "opencv2/opencv.hpp"
#include "tensorflow/lite/interpreter.h"
#include "tensorflow/lite/kernels/register.h"
#include "tensorflow/lite/model.h"
#include "tensorflow/lite/optional_debug_tools.h"
#include <iostream>
int main(int argc, char *argv[]) {
// initailize tflite model
const char *filename = "./best.tflite";

Image source

https://gyazo.com/eb5c5741b6a9a16c692170a41a49c858.png

Try resize it!

  • ![](https://gyazo.com/eb5c5741b6a9a16c692170a41a49c858.png | width=100)

Aligning images

left alignment

This is the code you need to align images to the left: