Skip to content

Instantly share code, notes, and snippets.

@fxpires
fxpires / coldfusion_password.py
Created August 7, 2020 14:59 — forked from patrickrbc/coldfusion_password.py
Script to decrypt coldfusion database passwords
#!/usr/bin/python
#
# Coldfusion Password Tool
# Copyright (C) 2013 Adam Boeglin <[email protected]>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
@fxpires
fxpires / DJANGO_TWISTED_HAPROXY.md
Created March 12, 2020 20:54 — forked from sspross/DJANGO_TWISTED_HAPROXY.md
Serving Django and Twisted using HAproxy

Serving Django and Twisted using HAproxy

Why?

Because we wanted to achive the following while developing a webapp using websockets:

Static serving (nginx), Django application (gunicorn) and Websockets service (twisted)

  • on the same IP
@fxpires
fxpires / git-ssh-auth-win-setup.md
Created February 14, 2020 18:52 — forked from bsara/git-ssh-auth-win-setup.md
Setup SSH Authentication for Git Bash on Windows

Setup SSH Authentication for Git Bash on Windows

Prepararation

  1. Create a folder at the root of your user home folder (Example: C:/Users/uname/) called .ssh.
  2. Create the following files if they do not already exist (paths begin from the root of your user home folder):
  • .ssh/config
@fxpires
fxpires / kubernetes_service_session_affinity.md
Created January 30, 2020 12:58 — forked from fjudith/kubernetes_service_session_affinity.md
Enable Session Affinity (a.k.a Sticky Session) to Kubernetes service
@fxpires
fxpires / kubedf
Created December 12, 2019 19:43 — forked from redmcg/kubedf
Bash script to show k8s PVC usage
#!/usr/bin/env bash
KUBEAPI=127.0.0.1:8001/api/v1/nodes
function getNodes() {
curl -s $KUBEAPI | jq -r '.items[].metadata.name'
}
function getPVCs() {
jq -s '[flatten | .[].pods[].volume[]? | select(has("pvcRef")) | '\
@fxpires
fxpires / sqlalchemy_mysql_binary_uuid.py
Created December 5, 2019 19:16 — forked from craigdmckenna/sqlalchemy_mysql_binary_uuid.py
SQLAlchemy, MySQL 16 bit UUID, Custom Data Type
import UUID
from sqlalchemy.dialects.mysql import BINARY
from sqlalchemy.types import TypeDecorator
class BinaryUUID(TypeDecorator):
'''Optimize UUID keys. Store as 16 bit binary, retrieve as uuid.
inspired by:
http://mysqlserverteam.com/storing-uuid-values-in-mysql-tables/
@fxpires
fxpires / newcert.py
Created November 28, 2019 20:59 — forked from Zeerg/newcert.py
Python script to generate CSR/Self Signed Cert. Needs pyOpenssl and python-whois
#!/usr/bin/python
from OpenSSL import crypto
import os
import sys
import datetime
import whois
#Variables
TYPE_RSA = crypto.TYPE_RSA
TYPE_DSA = crypto.TYPE_DSA
@fxpires
fxpires / array_chunk.py
Last active June 8, 2018 19:48 — forked from amitittyerah/array_chunk.py
array_chunk($arr, $size) version of Python
def array_chunk(arr, size):
chunks=[arr[x:x+size] for x in xrange(0, len(arr), size)]
return chunks
@fxpires
fxpires / QRLogo.php
Created November 4, 2015 15:42 — forked from NTICompass/QRLogo.php
QR Code + Logo Generator
<?php
/**
* QR Code + Logo Generator
*
* http://labs.nticompassinc.com
*/
$data = isset($_GET['data']) ? $_GET['data'] : 'http://labs.nticompassinc.com';
$size = isset($_GET['size']) ? $_GET['size'] : '200x200';
$logo = isset($_GET['logo']) ? $_GET['logo'] : FALSE;