Skip to content

Instantly share code, notes, and snippets.

View brunoborges's full-sized avatar
🏠
Working from home, as always

Bruno Borges brunoborges

🏠
Working from home, as always
View GitHub Profile
[
{
"id": 389291,
"title": "Kotlin Multiplatform Conversions at Android Jetpack Scale",
"description": "This is a case study of how we converted several Jetpack libraries to Kotlin Multiplatform as part of our ongoing experimentation with the multiplatform technology."
},
{
"id": 405587,
"title": "Compose Multiplatform on iOS",
"description": "An overview of the exciting present and future of Compose Multiplatform, including live demos and how to get started with the latest additions to the multiplatform UI framework built by JetBrains."
@brunoborges
brunoborges / App.java
Created November 28, 2022 19:29
Issue #55 in microsoft/openjdk-docker repo
import java.lang.management.ManagementFactory;
public class App {
public static void main(String[] args) {
long currentTime = System.currentTimeMillis();
long startTime = ManagementFactory.getRuntimeMXBean().getStartTime();
System.out.println("JVM Startup time: " + (currentTime - startTime));
}
}
#!/bin/bash
set -x
function setenv-all-pods() {
echo
DEPLOYMENT_LIST=$(kubectl -n $1 get deployment -o jsonpath='{.items[*].metadata.name}')
echo "Set Log4J setting for all pods by overriding LOG4J_FORMAT_MSG_NO_LOOKUPS with true."
for deployment_name in $DEPLOYMENT_LIST; do
kubectl -n $1 set env deployment $deployment_name LOG4J_FORMAT_MSG_NO_LOOKUPS="true"
done
@brunoborges
brunoborges / DSLWicket.scala
Created July 27, 2011 15:22
Scala DSL for Wicket
package code.webapp
import scala.collection.JavaConversions.seqAsJavaList
import org.apache.wicket.behavior.AttributeAppender
import org.apache.wicket.datetime.markup.html.form.DateTextField
import org.apache.wicket.extensions.validation.validator.RfcCompliantEmailAddressValidator
import org.apache.wicket.markup.html.basic.{ MultiLineLabel, Label }
import org.apache.wicket.markup.html.form.{ TextField, TextArea, SubmitLink, RadioGroup, Radio, PasswordTextField, FormComponent, Form, DropDownChoice, CheckGroup, Button }
import org.apache.wicket.markup.html.link.{ Link, BookmarkablePageLink }
import org.apache.wicket.markup.html.link.ExternalLink
@brunoborges
brunoborges / the_devops_song.md
Last active February 17, 2021 16:23
The DevOps Song, a fork of "Every Breath You Take, The Police"

The DevOps Song

A fork of "Every Breath You Take" from The Police / Sting. Watch on YouTube

Every bug you take
Every pull you make
Every build you break
Every log you erase
I'll be watching you

//DEPS org.openjfx:javafx-controls:11.0.2:${os.detected.jfxname}
//DEPS org.openjfx:javafx-graphics:11.0.2:${os.detected.jfxname}
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
public class hello extends Application {
dotnet_grpc_bench.report: Average: 1.32 ms
dotnet_grpc_bench.report- Requests/sec: 36510.82
dotnet_grpc_bench.report-
--
dotnet_grpc_bench.report: 90 % in 1.77 ms
dotnet_grpc_bench.report- 95 % in 2.10 ms
dotnet_grpc_bench.report- 99 % in 3.93 ms
--
go_grpc_bench.report: Average: 0.97 ms
go_grpc_bench.report- Requests/sec: 49283.43
@brunoborges
brunoborges / config.toml
Last active June 4, 2020 21:31
Proposal for a TOML Schema Definition
# [toml]
# version = 2
# schema = config.tosd
title = "TOML Example"
[owner]
name = "Tom Preston-Werner"
dob = 1979-05-27T07:32:00-08:00 # First class dates
@brunoborges
brunoborges / glassfish-resources.xml
Created April 10, 2013 15:06
Example of GlassFish Resources for Embedded deployment
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE resources PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 Resource Definitions//EN" "http://glassfish.org/dtds/glassfish-resources_1_5.dtd">
<resources>
<jdbc-connection-pool allow-non-component-callers="false" associate-with-thread="false" connection-creation-retry-attempts="0"
connection-creation-retry-interval-in-seconds="10" connection-leak-reclaim="false"
connection-leak-timeout-in-seconds="0" connection-validation-method="auto-commit"
datasource-classname="com.mysql.jdbc.jdbc2.optional.MysqlDataSource" fail-all-connections="false"
idle-timeout-in-seconds="300" is-connection-validation-required="false" is-isolation-level-guaranteed="true"
lazy-connection-association="false" lazy-connection-enlistment="false" match-connections="false"
max-connection-usage-count="0" max-pool-size="
# Build with:
# docker build -t entrypoint .
FROM alpine
COPY verify.sh ./
RUN chmod +x verify.sh
ENTRYPOINT ["./verify.sh"]
CMD ["sh"]