Skip to content

Instantly share code, notes, and snippets.

View gorillamoe's full-sized avatar
:octocat:
🦍🍌

Marco Kellershoff gorillamoe

:octocat:
🦍🍌
View GitHub Profile
@gorillamoe
gorillamoe / README.md
Created June 3, 2023 15:10 — forked from BoGnY/README.md
[WINDOWS] How to enable auto-signing Git commits with GnuPG for programs that don't support it natively

[WINDOWS] How to enable auto-signing Git commits with GnuPG for programs that don't support it natively

This is a step-by-step guide on how to enable auto-signing Git commits with GPG for every applications that don't support it natively (eg. GitHub Desktop, Eclipse, Git Tower, ...)

Requirements

  • Install GPG4Win: this software is a bundle with latest version of GnuPG v2, Kleopatra v3 certificate manager, GNU Privacy Assistant (GPA) v0.9 which is a GUI that uses GTK+, GpgOL and GpgEX that are respectively an extension for MS Outlook and an extension for Windows Explorer shell
  • Install Git for Windows: so you can have a *nix based shell, this software is a bundle with latest version of Git which use MINGW environment, a Git bash shell, a Git GUI and an extension for Windows Explorer shell (Make sure your local version of Git is at least 2.0, otherwise Git don't have support for automatically sign your commits)
  • Verify
@gorillamoe
gorillamoe / nginx-cors.nginx.conf
Created November 14, 2020 09:40
nginx CORS config - check if origin is set
if ($args !~ origin) {
add_header 'access-control-allow-origin' '*';
}
if ($args ~ origin) {
add_header 'access-control-allow-origin' $http_origin;
}
@gorillamoe
gorillamoe / ffmpeg-m3u8-to-mp4-conversion.md
Created October 7, 2020 11:46
HLS .m3u8 to .mp4 using ffmpeg
ffmpeg -i "http://host/folder/file.m3u8" -bsf:a aac_adtstoasc -vcodec copy -c copy -crf 50 file.mp4
-bsf:a aac_adtstoasc
  • bsf = (bit stream filter)
  • use aac_adtstoasc bsf for a audio streams, this is need if .m3u8 file consists with .ts files and output is .mp4
@gorillamoe
gorillamoe / ready.html
Created January 28, 2019 10:21 — forked from tjbenton/ready.html
document.ready Promise
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="./ready.js"></script>
<script>
document.ready.then(function() {
console.log('READY!');
});
</script>

Keybase proof

I hereby claim:

  • I am gorillamoe on github.
  • I am gorillamoe (https://keybase.io/gorillamoe) on keybase.
  • I have a public key ASDZnME_BBgBuVT9MKkdVD9cwrl9mBxScqzpiizmD09C6wo

To claim this, I am signing this object:

@gorillamoe
gorillamoe / nginx.conf
Created March 21, 2018 23:54 — forked from nrollr/nginx.conf
NGINX config for SSL with Let's Encrypt certs
# Advanced config for NGINX
server_tokens off;
add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options nosniff;
# Redirect all HTTP traffic to HTTPS
server {
listen 80;
server_name www.domain.com domain.com;
return 301 https://$host$request_uri;
@gorillamoe
gorillamoe / reboot-telekom-speedport.bash
Created December 23, 2017 20:10
Reboot/Restart Telekom Speedport
#!/bin/bash
# Usage:
# ./reboot-telekom-speedport.bash "URL or IP of speedport" "password of speedport"
# Example:
# ./reboot-telekom-speedport.bash "http://192.168.2.1" "aBcDEf1337GHijk"
main() {
local speedport
local devpwd
@gorillamoe
gorillamoe / ffmpeg-concat.bash
Created December 21, 2017 19:13
Concat (media) files with ffmpeg
#!/bin/bash
get_all_files() {
local argc=$#
local argv=($@)
for (( j=0; j<argc-1; j++ )); do
echo file $PWD/${argv[j]}
done
}
@gorillamoe
gorillamoe / install-tmux.sh
Created December 14, 2017 15:37 — forked from pokev25/install-tmux.sh
Install tmux 2.3 on rhel/centos 6
# Install tmux on Centos release 6.5
# install deps
yum install gcc kernel-devel make ncurses-devel
# DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL
curl -OL https://github.com/libevent/libevent/releases/download/release-2.0.22-stable/libevent-2.0.22-stable.tar.gz
tar -xf libevent-2.0.22-stable.tar.gz
cd libevent-2.0.22-stable
./configure --prefix=/usr/local
@gorillamoe
gorillamoe / convert-webm-to-gif.bash
Created November 17, 2017 16:30
Convert webm movies to GIF
#!/bin/bash
main() {
if [[ -z $1 ]];
then
printf "Input file required\n"
exit 1
else
local inputfile="$1"
fi