Skip to content

Instantly share code, notes, and snippets.

@gboddin
gboddin / output.txt
Created August 16, 2020 23:53
Check tor exit node circuit
192.168.0.63:9051 <- suspicious
198.100.148.114
46.19.141.86
198.100.148.114
46.19.141.86
192.168.0.63:9052
185.12.45.114
185.12.45.114
185.12.45.114
@gboddin
gboddin / default.conf
Last active September 6, 2019 13:52
rewrite to /index
server {
location / {
gzip on;
gzip_vary on;
gzip_min_length 10240;
gzip_proxied expired no-cache no-store private auth;
gzip_types text/plain text/css text/xml text/javascript application/x-javascript application/xml;
gzip_disable "MSIE [1-6]\.";
root /usr/share/nginx/html;
try_files $uri $uri/ /index.html;
@gboddin
gboddin / build-httpd-2.4-el6.sh
Last active July 3, 2018 20:32
centos-httpd-2.4.x RPM gen
#!/bin/bash
APACHE_VERSION=2.4.23
DISTCACHE_VERSION=1.4.5-23
APR_VERSION=1.5.2
APR_UTIL_VERSION=1.5.4
echo Downloading deps :
rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
yum install tar expat-devel freetds-devel db4-devel rpm-build postgresql-devel mysql-devel sqlite-devel wget unixODBC-devel nss-devel doxygen automake libtool autoconf zlib-devel libselinux-devel libuuid-devel pcre-devel openldap-devel lua-devel libxml2-devel openssl-devel -y
wget -c https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/18/Fedora/source/SRPMS/d/distcache-${DISTCACHE_VERSION}.src.rpm
@gboddin
gboddin / dpull.sh
Last active June 8, 2018 13:51
noDocker tools
#!/usr/bin/env bash
set -o pipefail
# hello-world latest ef872312fe1b 3 months a910 B
# hello-world latest ef872312fe1bbc5e05aae626791a47ee9b032efa8f3bda39cc0be7b56bfe59b9 3 months ago 910 B
# debian latest f6fab3b798be 10 weeks ago 85.1 MB
# debian latest f6fab3b798be3174f45aa1eb731f8182705555f89c9026d8c1ef230cbf8301dd 10 weeks ago 85.1 MB
if ! command -v curl &> /dev/null; then
echo >&2 'error: "curl" not found!'
@gboddin
gboddin / docker-compose.yaml
Last active May 5, 2018 12:29
docker-compose-pcas
version: '2'
services:
pcas-client:
build:
context: ./
dockerfile: Dockerfile.mock-client
image: openeuropa/pcas-client
ports:
- 8002:8002
volumes:
#!/bin/bash
root=$(pwd)
linker=/lib/x86_64-linux-gnu/ld-2.19.so
my_ld_library_path="${root}/lib64:${root}/usr/lib64"
while read lib_path; do
my_ld_library_path="${root}${lib_path}:${my_ld_library_path}"
done < <(cat "${root}/etc/ld.so.conf.d"/* 2> /dev/null | grep -v '^#')
my_path=${root}/bin:${root}/sbin:${root}/usr/bin:${root}/usr/sbin
LD_LIBRARY_PATH="${my_ld_library_path}" PATH=${my_path} "${root}${linker}" $@
@gboddin
gboddin / README.md
Last active November 1, 2017 12:19
Big file download in PHP ( guzzle )

This way ensure the file is streamed to the disk instead of memory.

  1. Install guzzle
composer require guzzlehttp/guzzle:~6.0
  1. Use get.php
@gboddin
gboddin / .drone.yaml
Created August 14, 2017 11:30
a sample .drone.yaml
pipeline:
hello:
image: fpfis/php56-dev
commands:
- composer --version
- echo "Hello world from a gist"
@gboddin
gboddin / post-checkout
Last active June 19, 2017 14:09
docker-compose branch git post-checkout plugin
#!/bin/sh
# Place me in .git/hooks/post-checkout
# Gets name from previous branch
PREVIOUS_BRANCH=$(git name-rev --name-only $1)
# Gets name from current branch
CURRENT_BRANCH=$(git name-rev --name-only $2)
if [ "${PREVIOUS_BRANCH}" != "${CURRENT_BRANCH}" ]; then
echo "Coming from ${PREVIOUS_BRANCH} to ${CURRENT_BRANCH}"
@gboddin
gboddin / makerpm.patch
Created August 19, 2016 10:10
php el6 patch makerpm
--- makerpm 2016-08-18 11:07:46.000000000 +0000
+++ makerpm-patched 2016-08-19 10:10:19.415245429 +0000
@@ -42,8 +42,8 @@
Version: PVERSION
Release: PRELEASE
Group: Networking/Daemons
-Source0: http://www.php.net/distributions/php-%{PACKAGE_VERSION}.tar.gz
-Copyright: PHP License
+Source0: http://www.php.net/distributions/php-PVERSION.tar.gz
+License: PHP License