Skip to content

Instantly share code, notes, and snippets.

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

Hans Bignon K. Tognon tobihans

🙃
Keeping it Super Simple !
View GitHub Profile
@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
@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.

Github to Discord Webhook Tutorial

In this tutorial I'll show you how to create a Github webhook that will post updates from your Github account to a channel in Discord. The steps are simple so follow along!

Create a Webhook in a Discord Channel

First you need to create a webhook in a text channel. We're assuming you have both Manage Channel and Manage Webhooks permissions!

  • Go in a channel properties (Alternatively, Server Settings, Webhooks works too)
@GusAntoniassi
GusAntoniassi / README.md
Created May 14, 2020 00:50
Play audio files on your microphone with ffmpeg

play-audio-mic.sh

This script was adapted to allow you to play audio files through your microphone input. It does so by creating a virtual microphone and piping an audio file to it.

The work was mostly done in this StackOverflow answer, I just adapted it to use ffmpeg and add a trap to cleanup on exit.

Requirements:

  • ffmpeg
  • Bash
  • PulseAudio/pactl
@tomhicks
tomhicks / plink-plonk.js
Last active March 18, 2024 02:23
Listen to your web pages