Skip to content

Instantly share code, notes, and snippets.

@ju5t
ju5t / modsec-712.patch
Created November 2, 2014 07:56
A patch for modsecurity and mpm-itk
diff --git a/apache2/msc_logging.c b/apache2/msc_logging.c
index 3323fac..ce8b069 100644
--- a/apache2/msc_logging.c
+++ b/apache2/msc_logging.c
@@ -225,10 +225,20 @@ static char *construct_auditlog_filename(apr_pool_t *mp, const char *uniqueid) {
char tstr[300];
apr_size_t len;
+ /**
+ * This is required for mpm-itk & mod_ruid2, though should be harmless for other implementations
---
#
# Patch exim.conf version 2.1.1 to include keep_environment=PWD
#
- hosts: directadmin
serial: 10
max_fail_percentage: 20
tasks:
- name: "patch: check exim.conf version"
shell: "grep -c 'SpamBlocker.exim.conf.2.1.*-release' /etc/exim.conf"
apt::source { 'somerepo':
ensure => $ensure_source,
comment => 'Somerepo mirror',
location => 'http://somerepo.com/mirror',
repos => 'main us2',
release => $::lsbdistcodename,
architecture => 'amd64',
require => Apt::Key['somerepo'],
}
Class['apt::update'] -> Package <| provider == 'apt' |>
<?php
/*
* A example of how to generate WHMCS-ready dist.whois.json files.
*/
$whoisServers = [];
$tlds = [];
$xml = simplexml_load_file('https://raw.githubusercontent.com/whois-server-list/whois-server-list/master/whois-server-list.xml');
foreach ($xml->domain as $id => $domain) {
@ju5t
ju5t / app.py
Created June 18, 2017 18:08
A sample Flask application used with Enchant Customer Support Software
import hmac
import hashlib
import json
from flask import Flask, request
app = Flask(__name__)
# Get the security from your sidebar app settings
security_key = 'My-Enchant-Signature'
@ju5t
ju5t / magento2.py
Last active March 12, 2018 13:38
#14054 Magento2 API
import os
import requests
# Magento
magento_endpoint = os.environ['MAGENTO_ENDPOINT']
magento_username = os.environ['MAGENTO_USERNAME']
magento_password = os.environ['MAGENTO_PASSWORD']
before_script:
- apt-get update -qq && apt-get install git zip unzip lftp -y
stages:
- deploy
deploy:
image: php:7.1
stage: deploy
environment:
@ju5t
ju5t / semantic-commit-messages.md
Created December 8, 2018 21:48 — forked from joshbuchea/semantic-commit-messages.md
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

#!/usr/bin/env bash
yum install -y php
cat <<\PHP > test.php
<?php
$domain = 'www.whmcs.com';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://' . $domain);
curl_setopt($ch, CURLOPT_CERTINFO, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
variables:
K8S_NAMESPACE: $CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG
stages:
- deploy
deploy-k8s:
image: dtzar/helm-kubectl
stage: deploy
before_script: