Skip to content

Instantly share code, notes, and snippets.

View renatocron's full-sized avatar

Renato Santos renatocron

  • eokoe
  • Sao Paulo, Brazil
View GitHub Profile
@swayvil
swayvil / data-example.json
Last active December 5, 2024 14:18
D3.js collapsing tree with boxes
{
"tree" : {
"nodeName" : "NODE NAME 1",
"name" : "NODE NAME 1",
"type" : "type3",
"code" : "N1",
"label" : "Node name 1",
"version" : "v1.0",
"link" : {
"name" : "Link NODE NAME 1",
@jberger
jberger / html_to_pdf.pl
Last active June 26, 2020 04:27
Extracted from old code, not necessarily recommended
sub _html_to_pdf {
my $cb = ref $_[-1] eq 'CODE' ? pop : undef;
my ($c, $html, $opts) = @_;
$opts||={};
require PDF::WebKit;
PDF::WebKit->configure(sub {
# default `which wkhtmltopdf`
my $exe= $c->executable( 'wkhtmltopdf' );
$_->wkhtmltopdf($exe);
});
apiVersion: "druid.apache.org/v1alpha1"
kind: "Druid"
metadata:
name: tiny-cluster
spec:
image: apache/druid:0.21.1
# Optionally specify image for all nodes. Can be specify on nodes also
# imagePullSecrets:
# - name: tutu
startScript: /druid.sh
@mehdi89
mehdi89 / generateDeployKey.sh
Created May 26, 2022 07:33
generate separate deploy keys for github repos in a os
#!/bin/sh
# This script generates a ssh key for a single repository
# and adds a custom configuration to the users (not global) ssh config file,
# and outputs the public key for you to copy and paste as the repo deploy key
# and outputs the url for you to clone the repo on the machine.
# Github docs ref:
# https://docs.github.com/en/developers/overview/managing-deploy-keys#using-multiple-repositories-on-one-server
#
# 1. Add the script to the user account of the machine. The home directory is fine.
# 2. Make the script executable by running the following command as the user:
@pmarreck
pmarreck / jpegxl.bash
Created March 3, 2025 18:09
jpegxl: a bash function to make conversions to/from jpegxl easier!
#!/usr/bin/env bash
### jpegxl: a bash function to make conversions to/from jpegxl easier!
# Silence function - runs a command silently but preserves exit code
silence() {
"$@" >/dev/null 2>&1
return $?
}