Skip to content

Instantly share code, notes, and snippets.

View WesleyCh3n's full-sized avatar
😺

WesleyCh3n WesleyCh3n

😺
View GitHub Profile
@yhatt
yhatt / marp.md
Last active June 7, 2024 13:14
Marp Next example
marp

Marp

h:250

Markdown presentation ecosystem
import tensorflow as tf
import numpy as np
import matplotlib.pyplot as plt
import functools
from PIL import Image
"""
TensorFlow Data Augmentation Example
Reference : https://github.com/tensorflow/models/blob/master/research/object_detection/core/preprocessor.py
@insdavm
insdavm / WireGuard-site-to-site.md
Last active May 3, 2024 21:19
Accessing a subnet that is behind a WireGuard client using a site-to-site setup

WireGuard Site-to-Site

Accessing a subnet that is behind a WireGuard client using a site-to-site setup

Problem Summary

We want to access a local subnet remotely, but it is behind a NAT firewall and we can't setup port forwarding. Outgoing connections work, but all incoming connections get DROPPED by the ISP's routing policy.

Solution Summary

@tkrotoff
tkrotoff / FrontendFrameworksPopularity.md
Last active June 12, 2024 10:38
Front-end frameworks popularity (React, Vue, Angular and Svelte)
@elalemanyo
elalemanyo / README.md
Last active June 3, 2024 02:38
Debug zsh startup time

Debug zsh startup time

  1. Inject profiling code

    At the beginning of your .zshrc add following: zmodload zsh/zprof

    and at the end add: zprof

    This will load zprof mod and display what your shell was doing durung your initialization.

@carry0987
carry0987 / RPi3-Auto-WiFi.md
Last active May 28, 2024 15:21
Raspberry Pi 3B+ Auto reconnect to wifi when lost connect

Auto reconnect to wifi when lost connection

Before you start, make sure ip command is available on your system. In modern Linux distributions, ip replaces older ifconfig command. If net-tools package (that includes ifconfig) is not installed and you prefer using it, you can install it via sudo apt-get install net-tools.

Create script file

Use touch /home/pi/wifi-reconnect.sh to create a shell script file, with the following content:

#!/bin/bash
@diegopacheco
diegopacheco / latest-protobuf-ubuntu-18-04.md
Created June 7, 2018 20:13
How to Install Latest Protobuf on Ubuntu 18.04
sudo apt-get install autoconf automake libtool curl make g++ unzip -y
git clone https://github.com/google/protobuf.git
cd protobuf
git submodule update --init --recursive
./autogen.sh
make
make check
sudo make install
sudo ldconfig
@ubergesundheit
ubergesundheit / index.md
Created November 6, 2017 13:19
ngrok on raspberrypi on systemd
  • Download ngrok binary
  • Create /etc/systemd/system/ngrok.service
  • Create /opt/ngrok/ngrok.yml
@tboerger
tboerger / gist:4840e1b5464fc26fbb165b168be23345
Created February 17, 2017 09:37
Golang LDAP search and authentication
package main
import (
"fmt"
"strings"
"gopkg.in/ldap.v2"
)
const (
ldapServer = "ad.example.com:389"