Skip to content

Instantly share code, notes, and snippets.

View MichaelPereira's full-sized avatar

Michael Pereira MichaelPereira

  • Northwesterrn Mutual
  • Paris/New York/Milwaukee
View GitHub Profile
@RainJayTsai
RainJayTsai / minimize_docker_python_application
Last active May 26, 2022 06:25
using docker BUILDKIT example, cache pip and mount temp whl to install. tensorflow python3.6
# syntax = docker/dockerfile:experimental
FROM python:3.6 as base
######################################
FROM base as builder
ENV PYTHONPATH=$PYTHONPATH:/install/lib/python3.6/site-packages/
# bind a wheel and install it
@GuillaumeSmaha
GuillaumeSmaha / build-stages-status.groovy
Last active March 18, 2022 02:26
Functions to get stages executed and build state
import hudson.model.Action
import com.cloudbees.workflow.flownode.FlowNodeUtil
import com.cloudbees.workflow.rest.external.StatusExt
import org.jenkinsci.plugins.workflow.graph.FlowNode
import org.jenkinsci.plugins.workflow.cps.nodes.StepStartNode
import org.jenkinsci.plugins.workflow.cps.nodes.StepEndNode
import org.jenkinsci.plugins.workflow.actions.LabelAction
@klenwell
klenwell / websphere.yml
Last active July 4, 2019 18:20
Ansible Playbook to Install WebSphere MQ on Debian Server
#
# This playbook assumes the WebSphere MQ file provided by IBM has already been
# downloaded to a specific directory (target.wd) on the server.
#
# ${target.wd} is a variable representing the working directory on the target
# server the MQ client will be installed.
#
# Note: Although this playbook is designed to be able to be run independently,
# it is in fact part of a longer playbook and therefore may have some other
# unexpected dependencies not reflected here.
@jfromaniello
jfromaniello / bcompare-git.md
Last active April 5, 2024 21:53
Integrate beyond compare 4 with git

Install command line tools:

then run this:

git config --global diff.tool bc3
git config --global difftool.bc3 trustExitCode true
git config --global merge.tool bc3
@alanhamlett
alanhamlett / api.py
Last active October 21, 2024 14:30
Serialize SQLAlchemy Model to dictionary (for JSON output) and update Model from dictionary attributes.
import uuid
import wtforms_json
from sqlalchemy import not_
from sqlalchemy.dialects.postgresql import UUID
from wtforms import Form
from wtforms.fields import FormField, FieldList
from wtforms.validators import Length
from flask import current_app as app
from flask import request, json, jsonify, abort
@gurglet
gurglet / git-post-checkout.sh
Created February 9, 2012 13:55
Git post checkout hook that reminds you of South migration changes when changing branches. Can be useful when you are when you are testing out a branch from someone else that requires migrations. Put the file in .git/hooks/post-checkout
#!/bin/bash
# Git post checkout hook.
# Reminds you of South migration changes when switching branches.
# Can be useful when you are when you are testing out a branch from
# someone else that requires migrations.
# Put the file in .git/hooks/post-checkout
PREVIOUS_HEAD=$1
NEW_HEAD=$2