In this article I’ll tell you about my pure functional library for Software Transactional Memory (STM) that I’ve built in C++. I adopted some advanced functional programming concepts that make it composable and convenient to use. Its implementation is rather small and robust, which differentiates the library from competitors. Let’s discuss what STM is and how to use it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # LVM Parser & Block Reader | |
| # | |
| # Copyright (C) 2016 Red Hat Inc | |
| require 'optparse' | |
| require 'ostruct' | |
| require 'binary_struct' | |
| ### constants |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| """ | |
| Mac OSX Catalina User Password Hash Extractor | |
| Extracts a user's password hash as a hashcat-compatible string. | |
| Mac OSX Catalina (10.15) uses a salted SHA-512 PBKDF2 for storing user passwords | |
| (hashcat type 7100), and it's saved in an annoying binary-plist-nested-inside-xml-plist | |
| format, so previously reported methods for extracting the hash don't work. |
On systems with UEFI Secure Boot enabled, recent Linux kernels will only load signed modules, so it's about time DKMS grew the capability to sign modules it's building.
These scripts are extended and scriptified variants of https://computerlinguist.org/make-dkms-sign-kernel-modules-for-secure-boot-on-ubuntu-1604.html and https://askubuntu.com/questions/760671/could-not-load-vboxdrv-after-upgrade-to-ubuntu-16-04-and-i-want-to-keep-secur/768310#768310 and add some error checking, a passphrase around your signing key, and support for compressed modules.
dkms-sign-module is a wrapper for the more generic sign-modules which can also be used outside of DKMS.
- Create a directory under
/root, say/root/module-signing, put the three scripts below in there and make them executable:chmod u+x one-time-setup sign-modules dkms-sign-module
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use Mojolicious::Lite; | |
| use Mojo::Util qw(url_escape b64_decode); | |
| use Mojo::JSON qw(from_json); | |
| # Sample Google OAuth2 user email application using Mojolicious | |
| # Based on the idea of https://gist.github.com/throughnothing/3726907 | |
| # For more info see: | |
| # https://developers.google.com/accounts/docs/OpenIDConnect | |
| # https://developers.google.com/wallet/digital/docs/jwtdecoder | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use Mojolicious::Lite; | |
| use Mojo::JWT; | |
| use Mojo::URL; | |
| use Mojo::UserAgent; | |
| my $ua = Mojo::UserAgent->new; | |
| my $keycloak = $ua->get('https://keycloak.jberger.pl/auth/realms/master/.well-known/openid-configuration')->result->json; | |
| my $jwkset = $ua->get($keycloak->{jwks_uri})->result->json; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Ext.define('Util', { | |
| config: {}, | |
| constructor: function () {}, | |
| /** | |
| * Returns a string with the object properties and values. Could be static | |
| * @param {Object} obj |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/env python3 | |
| import argparse | |
| import base64 | |
| import os | |
| import re | |
| import subprocess | |
| import sys | |
| from tempfile import mkstemp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| ######################################################################## | |
| ################################ README ################################ | |
| ######################################################################## | |
| # | |
| # This script is here to allow the use of "git push prod v1.2.3" commands or similar. | |
| # | |
| # Push a tag to a bare repository having this file as pre-receive hook, | |
| # and you'll be able to deploy directly from command line in your local environment, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| die () { | |
| msg="$1\n" | |
| shift | |
| printf "$msg" "$@" 1>&2 | |
| exit 1 | |
| } | |
| use=` |
NewerOlder