Skip to content

Instantly share code, notes, and snippets.

View bhubr's full-sized avatar

Benoît Hubert bhubr

View GitHub Profile
@ruanbekker
ruanbekker / gitea-docker-compose.yml
Created December 28, 2020 19:53
gitlab and drone server on docker for ubuntu 20
version: "3.7"
services:
# https://docs.gitea.io/en-us/install-with-docker/
gitea:
image: gitea/gitea:1.12.4
# https://hub.docker.com/r/gitea/gitea/tags
container_name: gitea
environment:
- APP_NAME=Gitea
@DanBurkhardt
DanBurkhardt / install-sshpass.sh
Last active February 16, 2024 14:05
a simple script to install "sshpass" on macOS
# Install "sshpass" on macOS.
#
# - sshpass allows you to easily automate password entry
# prompts for ssh sessions.
#
# Don't mess around with terminal if you
# don't know what any of this means, please.
# Evaluate for learning purposes at your own risk.
#
# Licensed under MIT. See below.
@israeljrs
israeljrs / ffmpeg_commands.md
Created February 18, 2020 13:13 — forked from travelhawk/ffmpeg_commands.md
Collection of ffmpeg commands (basic usage, streaming, advanced usage)

ffmpeg

ffmpeg is a fast video and audio converter that can also grab from a live audio/video source.

Standard usage

Getting help and information

  • -h show all options
  • -h(elp) topic show help
  • -version show version
  • -formats show available formats
@mmazzarolo
mmazzarolo / useAnimation.ts
Last active May 20, 2023 01:53
A basic "useAnimation" hook for React-Native animations
import { useRef } from "react";
import { Animated, Easing } from "react-native";
export const useAnimation = function(initialValue: number = 0) {
const endValue = initialValue === 0 ? 1 : 0;
const animationValueRef = useRef<Animated.Value>(new Animated.Value(initialValue));
const setup = (config: Partial<Animated.TimingAnimationConfig> = {}) =>
Animated.timing(animationValueRef.current, {
toValue: endValue,

Windows 10 - Using Git Bash With TMUX

Why Not Use WSL?

I tried the WSL and it isn't quite seamless enough for me. I ran in to problems when editing in VSCode and having watchers on my files (ng serve, dotnet watch run, etc.). In addition, I kept running in to problems that only manifest themselves when running in WSL. For example, this issue with doing production builds and the terser plugin has made many a developer rage-quit on using WSL. Just figuring out that it was an issue with the WSL took a lot of time.

That terser plugin issue was never resolved and I ended up having to keep a git bash window open in addition to my WSL console window so I could do production builds. To make matters worse, my npm packages were platform-dependent so I couldn't use the same project folder. So, my procedure was: commit whatever changes to test branch, push to repo, git pull on my "windows" project folder, and do a production build there

@W1R3D-Code
W1R3D-Code / sonarqube.service
Last active April 23, 2024 12:35
Running SonarQube as a Service on Linux with SystemD - /etc/systemd/system/sonarqube.service
[Unit]
Description=SonarQube service
After=syslog.target network.target
[Service]
Type=forking
ExecStart=/opt/sonarqube/bin/linux-x86-64/sonar.sh start
ExecStop=/opt/sonarqube/bin/linux-x86-64/sonar.sh stop
@sebastianrothbucher
sebastianrothbucher / README.md
Created March 16, 2019 16:12
Reactjs docs as ebook (epub / Kindle)

This is how you can conver the react docs to a .ePub / Kindle (.mobi) file to read in an eReader (or eReader app):

echo '' > ALL.md
for i in $(cat nav.yml | grep 'id:' | awk -F:  '{print$2}')
do
@hashrock
hashrock / svg-drag.js
Last active January 31, 2024 13:22
SVG Drag and Drop with React Hooks
import React from "react";
import ReactDOM from "react-dom";
const Circle = () => {
const [position, setPosition] = React.useState({
x: 100,
y: 100,
active: false,
offset: { }
});
@allenyllee
allenyllee / install_tools.sh
Last active July 7, 2024 11:34
mount vhdx in linux
#!/bin/bash
# install qemu utils
sudo apt install qemu-utils
# install nbd client
sudo apt install nbd-client