Skip to content

Instantly share code, notes, and snippets.

View jimschubert's full-sized avatar
🎯
Always here to help.

Jim Schubert jimschubert

🎯
Always here to help.
  • Richmond, VA
View GitHub Profile
@ledongthuc
ledongthuc / Readme.md
Last active March 23, 2020 08:19
[Github Actions][Go] Check pull requests before merging

Create template actions that's used to verify Go language pull requests before merging. It's easy to custom the flow, tools with your case.

Put pr_checker.yml or pr_checker_simple.yml to .github/workflows/ and see how it works with your pull requests. Make sure you are allows to use actions of Github.

  • pr_checker.yml is using by mine with full checking tools. It will make sure every Go langauge pull requests will be buildable, testable, passed security checking and error-able code checking.
  • pr_checker_simple.yml is more simpler with buildable, testable.

References:

@tcbyrd
tcbyrd / now.json
Last active December 26, 2018 12:36
Probot on Now.sh v2
{
"version": 2,
"builds": [
{ "src": "probot.js", "use": "@now/node" }
],
"env": {
"GITHUB_TOKEN": "@github-token",
"APP_ID": "@app-id",
"PRIVATE_KEY": "@private-key-base64"
},
@jimschubert
jimschubert / openapi-generator-cli.sh
Last active July 7, 2018 04:19
Script for running openapi-generator-cli
#!/usr/bin/env bash
####
# Save as openapi-generator-cli on your PATH. chmod u+x. Enjoy.
#
# This script will query github on every invocation to pull the latest released version.
# If you want repeatable executions, you can explicitly set a version via
# OPENAPI_GENERATOR_VERSION
# e.g.
# export OPENAPI_GENERATOR_VERSION=3.1.0
# openapi-generator-cli.sh
@ggarcia24
ggarcia24 / pipeline.gdsl
Last active March 1, 2024 13:54
GDSL supporting pipeline declarative
//The global script scope
def ctx = context(scope: scriptScope())
//What things can be on the script scope
contributor(ctx) {
method(name: 'pipeline', type: 'Object', params: [body: Closure])
property(name: 'params', type: 'org.jenkinsci.plugins.workflow.cps.ParamsVariable')
property(name: 'env', type: 'org.jenkinsci.plugins.workflow.cps.EnvActionImpl.Binder')
property(name: 'currentBuild', type: 'org.jenkinsci.plugins.workflow.cps.RunWrapperBinder')
property(name: 'scm', type: 'org.jenkinsci.plugins.workflow.multibranch.SCMVar')
@mkobit
mkobit / build.gradle.kts
Last active December 14, 2022 00:29
Run Kotlin REPL with built source code and main classpath in Gradle
// Assuming Kotlin plugin is applied...
// Run as: ./gradlew kotlinRepl --console plain --no-daemon
val kotlinRepl by tasks.creating {
description = "Starts Kotlin REPL with compiled main classes and runtime classpath"
val mainSourceSet = java.sourceSets["main"]
dependsOn(mainSourceSet.output)
doFirst {
val buildscriptClasspath = rootProject.buildscript.configurations["classpath"]
@jes
jes / generate-stencil.pl
Last active February 28, 2021 01:44
Convert a black-and-white PNG into an STL stencil
#!/usr/bin/perl
# XXX: This program is super unfinished. It works for my use case, but you will certainly
# have to modify the constants in order to use it for your use case. Make sure the input
# image is black-and-white. Note that the output triangle mesh is super unoptimised.
#
# This is very MVP.
use strict;
use warnings;
@jimschubert
jimschubert / .gitignore
Last active November 16, 2023 04:16
Prototyping a Flags/Bitmasks implementation in Kotlin 1.1.1
META-INF/
*.class
@jimschubert
jimschubert / mime.csv
Created March 17, 2017 20:26
List of more common mime types from MDN, in CSV and TSV
Name MIMEType Extension Description
aac audio/aac .aac AAC audio file
abw application/x-abiword .abw AbiWord document
arc application/octet-stream .arc Archive document (multiple files embedded)
avi video/x-msvideo .avi AVI: Audio Video Interleave
azw application/vnd.amazon.ebook .azw Amazon Kindle eBook format
bin application/octet-stream .bin Any kind of binary data
bz application/x-bzip .bz BZip archive
bz2 application/x-bzip2 .bz2 BZip2 archive
csh application/x-csh .csh C-Shell script
@jimschubert
jimschubert / swagger.sh
Last active March 26, 2018 01:35
Quick script for running swagger codegen cli directly
#!/bin/bash
ver=2.3.1
jar=swagger-codegen-cli-$ver.jar
md5=c838c266b80401ecd43521890b4abea8
repo="http://repo1.maven.org/maven2/io/swagger/swagger-codegen-cli/$ver/$jar"
if [ ! -f $jar ]; then
echo "[info] downloading $PWD/$jar from $repo" 1>&2
if ! curl --location --silent --fail --remote-name $repo -o $jar; then
@aseigneurin
aseigneurin / Spark high availability.md
Created November 1, 2016 16:42
Spark - High availability

Spark - High availability

Components in play

As a reminder, here are the components in play to run an application:

  • The cluster:
    • Spark Master: coordinates the resources
    • Spark Workers: offer resources to run the applications
  • The application: