Skip to content

Instantly share code, notes, and snippets.

View tobihans's full-sized avatar
🙃
Keep it Super Simple !

Hans Bignon K. Tognon tobihans

🙃
Keep it Super Simple !
View GitHub Profile
@mikeslattery
mikeslattery / .idea-lazy.vim
Last active March 11, 2025 12:01
LazyVim mappings for Jetbrains IDEs
" ~/.idea-lazy.vim
" LazyVim mappings for Jetbrains IDEs
" Required plugins. https://plugins.jetbrains.com/bundles/7-ideavim-bundle
" IDEAVim
" Which-Key
" IdeaVim-Sneak
" To install, add this to the top of your ~/.ideavimrc:
@cassidoo
cassidoo / simple-react-recorder.jsx
Last active March 3, 2025 18:44
A simple React microphone component, recording audio and showing the blob in the browser, styled with Tailwind.
"use client";
import { useState, useEffect, useRef } from "react";
function SimpleRecordButton() {
const [isRecording, setIsRecording] = useState(false);
const [audioStream, setAudioStream] = useState(null);
const [mediaRecorder, setMediaRecorder] = useState(null);
const [audioBlob, setAudioBlob] = useState(null);
const [recordingTime, setRecordingTime] = useState(0);
const timerRef = useRef(null);
@willismonroe
willismonroe / lib.typ
Last active January 9, 2024 16:02
Local bibliography for Typst
/* This typst local package will allow you to reference the same bibliography file from any typst file
Steps:
1) Create the directory ~/.local/share/typst/packages/local/mybib/1.0.0
2) Write a typst.toml file containing:
[package]
name = "mybib"
version = "1.0.0"
entrypoint = "lib.typ"
authors = ["Your Name Here"]
@tobihans
tobihans / README.en.md
Last active April 12, 2023 21:14
Hans Tognon - Curriculum Vitae
@tobihans
tobihans / Cargo.toml
Last active September 30, 2021 20:16
Pig Latin in Rust
[package]
name = "pig-latin"
version = "0.1.0"
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
regex = "1.5.4"
@dz4k
dz4k / Draggable._hs
Last active December 25, 2023 10:47
Draggable window in _hyperscript
-- Usage: _="install Draggable(dragHandle: .titlebar in me)"
behavior Draggable(dragHandle)
init
if no dragHandle set the dragHandle to me
end
on pointerdown(clientX, clientY) from dragHandle
halt the event
trigger draggable:start -- hooks, e.g. for adding a drop shadow while dragging
measure my x, y
@spr2-dev
spr2-dev / pattern_matching.md
Last active January 22, 2025 12:15
A quick beginner guide on Lua pattern matching

Lua Pattern Matching Cheat Sheet

Table Of Contents

  1. What's a pattern ?
  2. Positional characters
  3. Common matching characters
  4. Ranges, character sets and logic
  5. Quantifiers
  6. Capture groups
  7. Examples
@ecosse3
ecosse3 / update-neovim-nightly.sh
Last active December 21, 2023 19:02
Update Neovim Nightly from latest github release
#!/bin/bash
# Colors definitions
RED='\033[0;31m'
GREEN='\033[0;32m'
NC='\033[0m' # No Color
BOLD=$(tput bold)
NORMAL=$(tput sgr0)
# Check if necessary applications are installed
@mtotowamkwe
mtotowamkwe / alpine_linux_with_sqlite_docker_image.md
Created December 27, 2020 04:43
How to build an Alpine Linux docker image with an instance of SQLite installed using a Dockerfile.

Building docker images with Dockerfiles.

To build an alpine linux docker image with sqlite.

  • Create a directory.
  • In the directory above create a Dockerfile.
  • Add the desired commands in the Dockerfile.

Following are the commands in the Dockerfile.

@JT501
JT501 / 1-Laravel-Docker-SSL.md
Last active May 2, 2024 16:25
Laravel + nginx-proxy + docker-letsencrypt-nginx-proxy-companion

Laravel + nginx-proxy + acme-companion

(Updated on 7/8/2023)

Deploy Laravel on Docker using nginx-proxy + acme-companion (formerly called docker-letsencrypt-nginx-proxy-companion)

  1. Prepare two seperate docker compose file i.e docker-compose.nginx.yml & docker-compose.app.yml

  2. Create nginx directory and move docker-compose.nginx.yml into it.

  3. Create YOUR_DOMAIN.conf and YOUR_DOMAIN_location_override.conf in nginx directory.