Skip to content

Instantly share code, notes, and snippets.

@teyckmans
teyckmans / gitlab-arc-review-boost.js
Created April 15, 2024 09:53
gitlab arc review boost
function isHidden(el) {
if (el === null || el === undefined) {
return true;
}
var style = window.getComputedStyle(el);
return (style.display === 'none')
}
document.addEventListener("keydown", function (event) {
const mergeRequestDiv = document.querySelector("#content-body > div.merge-request")
@teyckmans
teyckmans / sst-cdk-bridge.ts
Created April 2, 2024 14:27
Makes it possible to deploy an SST app with plain CDK
/* eslint-disable */
import { App } from 'sst/constructs';
import { initProject, useProject } from 'sst/project.js';
export const sstCdkBridgeCreateApp = async (): Promise<void> => {
const stage = process.env['SST_STAGE']!;
console.log(`STAGE: ${stage}`);
await initProject({
@teyckmans
teyckmans / .gitlab-ci.yml
Last active June 13, 2019 20:29
GitLab CI file for Gradle build with build/check/publish stages
image: adoptopenjdk/openjdk12:alpine
stages:
- build
- check
- publish
variables:
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
@teyckmans
teyckmans / DslExtensions.kt
Last active May 26, 2019 21:55
KubeRig resourcesHelper extension function
package example
import io.k8s.api.core.v1.ContainerDsl
fun ContainerDsl.resourcesHelper(cpuRequest: String = "", memoryRequest: String = "", cpuLimit: String = "", memoryLimit: String = "") {
resources {
if (cpuRequest != "" || memoryRequest != "") {
requests {
if (cpuRequest != "") {
request("cpu") {