Skip to content

Instantly share code, notes, and snippets.

View azubieta's full-sized avatar
:octocat:
Coding or thinking in something to code.

Alexis López Zubieta azubieta

:octocat:
Coding or thinking in something to code.
View GitHub Profile
@azubieta
azubieta / odoo_nginx_security_snippet.conf
Last active January 20, 2024 17:00
NGINX hardening for Odoo
# config to don't allow the browser to render the page inside an frame or iframe
# and avoid clickjacking http://en.wikipedia.org/wiki/Clickjacking
# if you need to allow [i]frames, you can use SAMEORIGIN or even set an uri with ALLOW-FROM uri
# https://developer.mozilla.org/en-US/docs/HTTP/X-Frame-Options
add_header X-Frame-Options SAMEORIGIN;
# when serving user-supplied content, include a X-Content-Type-Options: nosniff header along with the Content-Type: header,
# to disable content-type sniffing on some browsers.
# https://www.owasp.org/index.php/List_of_useful_HTTP_headers
# currently suppoorted in IE > 8 http://blogs.msdn.com/b/ie/archive/2008/09/02/ie8-security-part-vi-beta-2-update.aspx
@azubieta
azubieta / test-runtime-libs-version-checks.sh
Last active May 25, 2022 16:18
test-runtime-libs-version-checks.sh
#!/bin/bash
#set -ex
TARGET_SYSTEMS="
archlinux:latest
centos:6 centos:7 centos:8
fedora:33 fedora:34 fedora:35 fedora:37
ubuntu:16.04 ubuntu:18.04 ubuntu:20.04 ubuntu:21.04 ubuntu:22.04
debian:stable-slim debian:unstable-slim debian:testing-slim
opensuse/leap:latest opensuse/tumbleweed:latest
@azubieta
azubieta / AppRun.sh
Created March 2, 2022 18:43
Bash implementation of the appimage-builder AppRun
#!/bin/bash
export ORIGIN="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
PRINTENV_BIN=$(which printenv)
set_bundle_env() {
eval "echo SETTING_ENV: $NAME $VALUE"
NAME="$1"
VALUE="$2"
@azubieta
azubieta / get-appimagetool-debian.sh
Last active November 26, 2019 03:49
appimagetool installer for Debian
/bin/bash
set -ex
HOST_ARCH=$(dpkg-architecture -q DEB_BUILD_ARCH)
curl -o /tmp/appimagetool-${HOST_ARCH}.AppImage -L https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-${HOST_ARCH}.AppImage
chmod +x /tmp/appimagetool-${HOST_ARCH}.AppImage
cd /opt && /tmp/appimagetool-${HOST_ARCH}.AppImage --appimage-extract
mv /opt/squashfs-root /opt/appimagetool.AppDir
@azubieta
azubieta / build-index-fm.sh
Created July 23, 2019 17:50
Generates an AppImage for IndexFm
#!/usr/bin/env bash
set -e
# Install linuxdeploy
LINUXDEPLOY_BIN=$PWD/linuxdeploy
LINUXDEPLOY_PLUGIN_QT_BIN=$PWD/linuxdeploy-plugin-qt
wget -Nc https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage -O $LINUXDEPLOY_BIN
wget -Nc https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage -O $LINUXDEPLOY_PLUGIN_QT_BIN
@azubieta
azubieta / get_appimage_first_run.sh
Created February 23, 2018 09:31
Retrieves and deploys the appimage first run utility.
USER_BIN_PATH="${HOME}/.local/bin/"
mkdir -p ${USER_BIN_PATH}
TARGET_PATH="${USER_BIN_PATH}/appimage-first-run"
wget -c -nv https://github.com/azubieta/appimage-desktop-integration/releases/download/v0.1/Appimage_First_Run_Utility-cf99564-x86_64.AppImage \
-O $TARGET_PATH
chmod +x $TARGET_PATH
DESKTOP_ENTRY_PATH=$HOME/.local/share/applications/org.appimage.first.run.desktop
rm ${DESKTOP_ENTRY_PATH}