Skip to content

Instantly share code, notes, and snippets.

View dmexs's full-sized avatar

Emeka Anyanwu dmexs

View GitHub Profile
from hamilton.lifecycle import base
from hamilton import node, graph
import logging
from typing import Type, Any, Optional, Dict, List
import mlflow
import pickle
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)

Custom Root CA Settings

Podman VM (on Mac)

https://github.com/containers/podman/blob/main/docs/tutorials/podman-install-certificate-authority.md

Update System Store (Debian/Ubuntu)

Often ignored by many package managers, languages, and apps but worth doing anyway. The following works in debian/ubuntu based containers. The finalized store is accessible afterwards at /etc/ssl/certs/ca-certificates.crt which can be referenced below.

USER root
RUN mkdir /usr/local/share/ca-certificates/extra
COPY certs/*.crt /usr/local/share/ca-certificates/extra/
@dmexs
dmexs / package.json
Last active January 22, 2023 19:59
NestJS Webpack Multiple Configs
{
"name": "PROJECT",
"version": "0.0.1",
"description": "",
"author": "",
"private": true,
"license": "UNLICENSED",
"scripts": {
"start": "webpack --mode=development --env watch=true debug=true",
"build": "webpack --mode=production",
@dmexs
dmexs / example_controller.rb
Last active April 9, 2018 00:43 — forked from TheKidCoder/example_controller.rb
Rails - Sanitize Ordering Params
class ClientsController
include OrderingHelpers
def index
# order_by sanitation should work fine here, with sanitation to created_by if invalid
@clients = Clients.order(sanitized_ordering).where(user_id: current_user.id)
# trying to order_by sales.date for example will fail here even if it's valid if the current controller is not ClientController
@clients = Clients.joins(:sales).order(sanitized_ordering.where(user_id: current_user.id)
@dmexs
dmexs / gist:c17a916395dc746e0293
Created September 15, 2015 13:49
learning rails gemfile.lock
GIT
remote: git://github.com/twbs/bootstrap-sass.git
revision: bf9b497538b8c74e9cb29ba8a754184ebee499dd
ref: bf9b497538b8c74e9cb29ba8a754184ebee499dd
specs:
bootstrap-sass (3.3.5)
autoprefixer-rails (>= 5.0.0.1)
sass (>= 3.3.0)
GEM