Skip to content

Instantly share code, notes, and snippets.

View DanielChuDC's full-sized avatar
🎯
Focusing

danielchu DanielChuDC

🎯
Focusing
  • singapore
View GitHub Profile
@nadvolod
nadvolod / playwright-azure.yml
Last active September 25, 2023 02:54
Playwright test running in Azure DevOps
trigger:
- main
pool:
vmImage: ubuntu-latest
steps:
- task: NodeTool@0
inputs:
versionSpec: '14.x'
@kenrick95
kenrick95 / poc.html
Created May 30, 2020 15:28
Handles Play/Pause Media Key
<!DOCTYPE html>
<html lang="en" style="width: 100%; height: 100%;">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>PoC</title>
</head>
<body style="width: 100%; height: 100%;">
<audio
id="player"
@jdavidzapatab
jdavidzapatab / Generate Jar with dependencies (fatJar) using Gradle.md
Last active November 23, 2024 21:18
Generate Jar with dependencies (fatJar) using Gradle

Generate Jar with dependencies (fatJar) using Gradle

There are multiple posts (old and new) with instructions on how to generate a fat jar, this is, a jar file for your application containing also your application's dependencies. Most solutions I have tried did not work for me, even in a simple Hello World java application, but I have found one that seems to work as expected.

Here it is:

Instructions

@ArturKlauser
ArturKlauser / check-qemu-binfmt.sh
Last active February 13, 2023 16:53
Building Multi-Architecture Docker Images With Buildx
#!/bin/bash
# (c) 2020 [email protected]
# SPDX-License-Identifier: Apache-2.0 OR MIT
#
# This script checks if all software requirements are met in a Linux environment
# in order to use 'docker buildx' to build multi-architecture images.
# For more information see:
# https://nexus.eddiesinentropy.net/2020/01/12/Building-Multi-architecture-Docker-Images-With-Buildx/
function error() {
@ArturKlauser
ArturKlauser / reregister-qemu-binfmt.sh
Last active March 16, 2024 08:05
Building Multi-Architecture Docker Images With Buildx
#!/bin/bash
# (c) 2020 [email protected]
# SPDX-License-Identifier: Apache-2.0 OR MIT
#
# This script tries to reregister QEMU's binfmt_misc handlers with the
# fix-binary (F) flag in order to be usable with 'docker buildx' to build
# multi-architecture images.
# For more information see:
# https://nexus.eddiesinentropy.net/2020/01/12/Building-Multi-architecture-Docker-Images-With-Buildx/
import 'package:flutter/material.dart';
@immutable
class ClipShadowPath extends StatelessWidget {
final Shadow shadow;
final CustomClipper<Path> clipper;
final Widget child;
ClipShadowPath({
@required this.shadow,
@bamnet
bamnet / Dockerfile
Created January 7, 2019 06:02
Multiarch Go Builds + Google Cloud Build
FROM golang:alpine as builder
RUN apk update && apk add git && apk add tzdata
COPY . $GOPATH/src/github.com/bamnet/village
WORKDIR $GOPATH/src/github.com/bamnet/village
ARG CGO_ENABLED=0
ARG GOARCH=amd64
ARG GOARM=6
@doi-t
doi-t / protocol_buffers_and_grpc_tutorial.md
Last active July 27, 2023 11:12
Protocol Buffers & gRPC Tutorial: Python & Go
@davivcgarcia
davivcgarcia / inventory.ini
Last active November 20, 2019 04:39
Red Hat OpenShift v3.11 - Inventory Example: Authenticated Registry + Glusterfs (Logging, Metrics, Registry, Apps)
[OSEv3:children]
masters
nodes
etcd
glusterfs
[OSEv3:vars]
ansible_ssh_user=ec2-user
ansible_become=true
@svx
svx / delete-evicted-pods-all-namespaces.sh
Created August 15, 2018 12:45 — forked from psxvoid/delete-evicted-pods-all-namespaces.sh
Delete evicted pods from all namespaces (also ImagePullBackOff and ErrImagePull)
#!/bin/sh
# based on https://gist.github.com/ipedrazas/9c622404fb41f2343a0db85b3821275d
# delete all evicted pods from all namespaces
kubectl get pods --all-namespaces | grep Evicted | awk '{print $2 " --namespace=" $1}' | xargs kubectl delete pod
# delete all containers in ImagePullBackOff state from all namespaces
kubectl get pods --all-namespaces | grep 'ImagePullBackOff' | awk '{print $2 " --namespace=" $1}' | xargs kubectl delete pod
# delete all containers in ImagePullBackOff or ErrImagePull or Evicted state from all namespaces