Skip to content

Instantly share code, notes, and snippets.

View kwmiebach's full-sized avatar

kwmiebach kwmiebach

View GitHub Profile
@sivel
sivel / ContentMD5-ReqDotMD5.pm
Created February 20, 2012 19:14
nginx Perl Module to Output Content-MD5 HTTP Header
# nginx Embedded Perl module for adding a Content-MD5 HTTP header
#
# This perl module, will output an MD5 of a requested file using the
# Content-MD5 HTTP header, by pulling the hex hash from a file of the
# same name with .md5 appended to the end, if it exists.
#
# Author: Matt Martz <[email protected]>
# Link: https://gist.github.com/1870822#file_content_md5_req_dot_md5.pm
# License: http://www.nginx.org/LICENSE
@gitanat
gitanat / sendreceive.py
Created November 9, 2012 09:00
send and receive python objects through network with integrity and authentication
'''this module implements two functions, send() and receive(), capable
of sending arbitrary objects through the network (with pickle), with
authentication and integrity assurance'''
import socket
try:
import cPickle as pickle
except ImportError:
import pickle
import hmac
@noprompt
noprompt / console-macros.clj
Last active December 22, 2015 05:59
ClojureScript console functions/macros
(ns clojurescript.console.macros
(:refer-clojure :exclude [time]))
(defmacro with-group [title & body]
`(do
(.group js/console ~title)
~@body
(.groupEnd js/console)))
(defmacro with-group-collpased [title & body]
@asafge
asafge / ng-really.js
Created November 12, 2013 13:06
ng-really? An AngularJS directive that creates a confirmation dialog for an action.
/**
* A generic confirmation for risky actions.
* Usage: Add attributes: ng-really-message="Are you sure"? ng-really-click="takeAction()" function
*/
angular.module('app').directive('ngReallyClick', [function() {
return {
restrict: 'A',
link: function(scope, element, attrs) {
element.bind('click', function() {
var message = attrs.ngReallyMessage;
@rockavoldy
rockavoldy / 0-odoo-cheatsheet.md
Last active July 13, 2025 03:08
Odoo Cheatsheet
@kwmiebach
kwmiebach / get_toml_value.sh
Last active June 7, 2025 12:31
Read values from a simple toml file in bash
#######################################################################################
# Bash function get_toml_value() to get the value of a key in a section of a TOML file.
# Versioned here: https://gist.github.com/kwmiebach/e42dc4a43d5a2a0f2c3fdc41620747ab
# Call it like this:
# value=$(get_toml_value "./conf/config.toml" "server_b" "domain")
# Result should be "my123.example.com" in the case of this example file:
# ---------------------------
# [server_a]
# proto = "https"
# domain = "test.example.net"
@kwmiebach
kwmiebach / smnetscanner.sh
Last active January 1, 2025 15:30
If you can't use angryipscanner from a command line
#!/bin/bash
# (c) CompuMatter, LLC, ServerMatter
# no warranty expressed or implied - use as is.
# See https://www.youtube.com/watch?v=4hjskxkapYo
# versioned here: https://gist.github.com/kwmiebach/6565ad1b43f3c781b23fce6ba80f59ea
# history of the gist:
# 2023-09-28 downloaded from https://cloud.compumatter.biz/s/fxfYM9SkamBtGqG - unchanged
# purpose of this script:
@kwmiebach
kwmiebach / make-system-folder.cmd
Last active January 1, 2025 15:29
Create a `Windows Master Control Panel' / 'All Tasks Folder on the Desktop'. The so called 'god mode '
@echo off
cd %USERPROFILE%\Desktop
mkdir "system.{ED7BA470-8E54-465E-825C-99712043E01C}"
@kwmiebach
kwmiebach / addkeys.sh
Last active January 11, 2025 01:45
Add public keys for a user to ~/.ssh/authorized_keys
#!/bin/bash
# GitHub SSH Key Updater
# ---------------------
# SECURITY WARNING: This script grants SSH access to your machine!
# Only add keys from GitHub users you absolutely trust with full SSH access to your system.
# Each added public key will allow that user to log into your machine via SSH.
#
# Purpose:
# Fetches and merges public SSH keys from a GitHub user into your ~/.ssh/authorized_keys file,
@kwmiebach
kwmiebach / v17.css
Created December 18, 2024 12:42
Styles V17
/* chrome n3 */
a.fw-bold.text-truncate {
font-size: 30px
}
span.min-w-0.text-truncate {
font-size: 30px
}