Skip to content

Instantly share code, notes, and snippets.

// Working Version :)
import React from 'react';
import {NextPageContext} from "next";
import {i18n} from '../../i18n'
import ReactMarkdown from "react-markdown";
import matter from "gray-matter";
import StandardPage from "../../components/layout/standard-page";
import {MDXProvider} from "@mdx-js/react";
❯ sh ./startMac.sh
DEVICE_MODEL: iMacPro1,1
SERIAL_SET_COUNT: 1
OUTPUT_DIRECTORY: .
Cloning into 'OpenCorePkg'...
remote: Enumerating objects: 1597, done.
remote: Counting objects: 100% (1597/1597), done.
remote: Compressing objects: 100% (1430/1430), done.
remote: Total 1597 (delta 324), reused 727 (delta 112), pack-reused 0
Receiving objects: 100% (1597/1597), 14.33 MiB | 1.79 MiB/s, done.
package demo.util;
import javassist.util.proxy.MethodFilter;
import javassist.util.proxy.MethodHandler;
import javassist.util.proxy.ProxyFactory;
import javassist.util.proxy.ProxyObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.persistence.EntityManager;
@rparree
rparree / gist:876e50f3226f9492d252feae5d2a4a90
Last active March 28, 2021 08:53
mb docker-compose.yaml
version: "3.7"
services:
traefik:
image: "traefik:v2.1.1"
container_name: "traefik"
environment:
- TZ=Europe/Paris
command:
- "--api.insecure=true"
- "--providers.docker=true"
[info] +-org.http4s:http4s-blaze-server_2.13:0.21.13 [S]
[info] | +-org.http4s:http4s-blaze-core_2.13:0.21.13 [S]
[info] | | +-org.http4s:blaze-http_2.13:0.14.14 [S]
[info] | | | +-com.twitter:hpack:1.0.2
[info] | | | +-org.eclipse.jetty.alpn:alpn-api:1.1.3.v20160715
[info] | | | +-org.http4s:blaze-core_2.13:0.14.14 [S]
[info] | | | +-org.log4s:log4s_2.13:1.9.0 [S]
[info] | | | +-org.slf4j:slf4j-api:1.7.25 (evicted by: 1.7.30)
[info] | | | +-org.slf4j:slf4j-api:1.7.30
@rparree
rparree / cleanVisioSVG.sh
Last active May 8, 2020 21:11
Script i made to clean SVG export from Visio (2007). Testing the cleaned SVGs in Chrome, Firefox and Inkscape.
#! /bin/sh
#set px for font size with metric
perl -pi -e 's/font-size:(\d+);/font-size:$1px;/g' "$1"
#replace em metrics with px (this is a bit brittle, as the ems are relative to the container text)
#First the @dy=".." (multiply by 8)
perl -pi -e 's/dy=\"(\d+(\.\d+)?)em\"/"dy=\"".sprintf("%.1f",$1*8)."px\""/ge' "$1"
#Then all the others (multiply by 12, which is the default font size set bu visio export)
perl -pi -e 's/(\d+(\.\d+)?)em/sprintf("%.1f",$1*12)."px"/ge' "$1"

You should have received the setup document. In addition to that, please prepare the steps below prior to the course. The connection in the trainng room can be slow, so this way we don't loose time.

These instructions are based on Fedora.

Install docker

Ensure dnf-plugins-core is installed (this provides commands to manage repositories)

Create a new minikube cluster

minikube -p networking start --network-plugin=cni --kubernetes-version v1.15.6 --memory=4096 

It won't start-up completely. Just do a minikube -p networking stop when it has completed.

Update the country-rest service

  • Delete your minikube 
$ minikube delete
  • Create a new cluster
$ minikube start --kubernetes-version v1.14.7 --vm-driver virtualbox \
  --cpus=2 --memory=8196 --insecure-registry=nexus-docker.local --extra-config=kubelet.authentication-token-webhook=true \
  --extra-config=scheduler.address=0.0.0.0 \
const initAnimateCSSSupport = () => {
const ACTION = Object.freeze({
START: Symbol("start"),
STOP: Symbol("stop"),
});
const updateAnimateClasses = (action) => (node) => {
const classes = node.getAttribute('data-animate').split(" ");
const fn = action === ACTION.START ? node.classList.add : node.classList.remove;