Skip to content

Instantly share code, notes, and snippets.

View rm3l's full-sized avatar
💭
I may be slow to respond.

Armel Soro rm3l

💭
I may be slow to respond.
View GitHub Profile
@nickboldt
nickboldt / oc-pull-secret-update-global.sh
Last active February 26, 2024 13:55
add tokens/pwds for quay.io (and/or for registry.redhat.io) to your openshift's global (if admin) or per-project (if not admin) pull secret
#!/bin/bash
# set your own logins!
QUAY_USER="****"
QUAY_TOKEN="****"
RRIO_USERNAME="****"
RRIO_PASSWORD="****"
# login to quay.io
REGISTRY="quay.io"
@rm3l
rm3l / create-local-k8s-cluster.sh
Last active April 25, 2023 07:11
Convenience script to install my local Kubernetes KinD cluster, with the following resources (a local image registry, a Devfile registry). Requires kind, docker, kubectl, helm, curl, openssl, operator-sdk, yq commands.
#!/bin/sh
set -o errexit
set -x
#alias docker=podman
#KIND_EXPERIMENTAL_PROVIDER=podman
cluster_name=${1:-local-k8s-cluster}
registry_port=${2:-5000}
@Strykar
Strykar / upgrade_livepeer.sh
Last active October 16, 2023 11:13
Upgrade Livepeer Go binaries. Run as: $ upgrade_livepeer.sh 4efbda6d5e6586e7eb1e6ccbd526da65cdbe2e4e27a01cb76b1f2893fe790fdb
#!/bin/bash
# Download, extract and update Livepeer binary from Github to a pre-existing directory you set below
# It assumes you have extracted the previous livpeer tar.gz in it and run livepeer from the same directory
# Not intended to be run as root
#
# Expects bash, jq, curl, grep, sed, sha256sum and tar to be installed, usually available even on embedded systems
# Windows Subsystem for Linux (WSL) or Cygwin should provide every utility on Windows
# shellcheck disable=SC2015
set -euf -o pipefail
@zsmb13
zsmb13 / publish-mavencentral.gradle
Last active April 21, 2021 07:25
Basic MavenCentral script
apply plugin: 'maven-publish'
apply plugin: 'signing'
task androidSourcesJar(type: Jar) {
archiveClassifier.set('sources')
if (project.plugins.findPlugin("com.android.library")) {
from android.sourceSets.main.java.srcDirs
from android.sourceSets.main.kotlin.srcDirs
} else {
from sourceSets.main.java.srcDirs
@m-radzikowski
m-radzikowski / script-template.sh
Last active April 25, 2024 18:43
Minimal safe Bash script template - see the article with full description: https://betterdev.blog/minimal-safe-bash-script-template/
#!/usr/bin/env bash
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
usage() {
cat <<EOF
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...]
@rm3l
rm3l / mid_circle_radial_gauge.dart
Last active June 17, 2021 14:32
Sample code for creating a mid-circle radial gauge widget with Flutter. See https://rm3l.org/creating-a-mid-circle-radial-gauge-in-flutter/ for more details.
import 'dart:math';
import 'package:flutter/material.dart';
class MyCustomRadialGauge extends StatefulWidget {
@override
_MyCustomRadialGaugeState createState() => _MyCustomRadialGaugeState();
}
class _MyCustomRadialGaugeState extends State<MyCustomRadialGauge>
@noseka1
noseka1 / How to approve OpenShift operator upgrade using CLI.md
Last active April 4, 2024 09:15
How to approve OpenShift operator upgrade using CLI

Install the operator using the Manual approval strategy, see the attached screenshot.

An install plan has been created but not executed as it has not been approved:

oc get installplan -n openshift-logging
NAME            CSV                                    APPROVAL   APPROVED
install-dq68d   clusterlogging.4.5.0-202007012112.p0   Manual     false

How to use this code

  1. Add the build_pull_request.sh to the root of your git repository;
  2. Add the android.yml file to .github/workflows/;
  3. Make build_pull_request.sh executable using: chmod +x build_pull_request.sh;
  4. Commit your code and push the changes

LICENSE

# MIT License
{
"meta": {
"theme": "elegant"
},
"basics": {
"name": "Thomas Davis",
"label": "Web Developer",
"image": "https://avatars0.githubusercontent.com/u/416209?s=460&u=38f220a2c9c658141804f881c334c594eb1642ac&v=4",
"summary": "I'm a full stack web developer who can build apps from the ground up. I've worked mostly at startups so I am used to wearing many hats. I am a very product focused developer who prioritizes user feedback first and foremost. I'm generally very flexible when investigating new roles. ",
"website": "https://lordajax.com",
#!/usr/bin/env lua
local socket = require("socket")
local use_ssl, ssl = pcall(require, "ssl")
local Blynk = require("blynk.socket")
local Timer = require("timer")
local http = require("socket.http")
assert(#arg >= 1, "Please specify Auth Token")