Skip to content

Instantly share code, notes, and snippets.

View mattwelke's full-sized avatar

Matt Welke mattwelke

View GitHub Profile
var gulp = require('gulp');
var browserSync = require('browser-sync').create();
// Static Server + watching css/html files
gulp.task('serve', ['css'], function() {
browserSync.init({
proxy: "http://localhost:2368"
});
@mattwelke
mattwelke / Person.java
Created May 30, 2022 22:46
How do I configure VS Code and Gradle to use generated Java code with the Gradle Protobuf plugin?
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: message.proto
package com.example.tutorial.protos;
/**
* Protobuf type {@code tutorial.Person}
*/
public final class Person extends
com.google.protobuf.GeneratedMessageV3 implements
@mattwelke
mattwelke / operations_controller.rb
Created November 22, 2016 21:06
Async Controller Actions in Ruby on Rails
# Full repo:
# https://gitlab.com/mwelke/rails-async-example
Future = Concurrent::Future
class OperationController < ApplicationController
def sync
ops = [1, 2, 3]
ops.each do |n|
@mattwelke
mattwelke / wgferg
Created November 29, 2021 18:40
e3g35g3
!SESSION 2021-11-29 12:56:28.241 -----------------------------------------------
eclipse.buildId=unknown
java.version=11.0.11
java.vendor=AdoptOpenJDK
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en
Command-line arguments: -data /home/matt/.vscode-server/data/User/workspaceStorage/f631cd3f34341cfe0d384ac8caa5934a/redhat.java/jdt_ws
!ENTRY org.eclipse.jdt.ls.core 1 0 2021-11-29 12:56:28.779
!MESSAGE class org.eclipse.jdt.ls.core.internal.JavaLanguageServerPlugin is started
@mattwelke
mattwelke / g43gg35g
Created November 26, 2021 19:07
89n3f8nf9n
HISTFILE=/workspace/.gitpod/cmd-0 history -r; {
go get -v github.com/go-delve/delve/cmd/dlv
go get -v -t -d ./...
} && {
go build -o app && ./app
}
gitpod /workspace/go-starter $ HISTFILE=/workspace/.gitpod/cmd-0 history -r; {
> go get -v github.com/go-delve/delve/cmd/dlv
@mattwelke
mattwelke / gist:6b16e020da658d63e46cb686e37c9240
Created November 24, 2021 01:24
VS Code Gitpod Java logs when error "No delegateCommandHandler for vscode.java.startDebugSession" occurs
!SESSION 2021-11-24 01:11:24.744 -----------------------------------------------
eclipse.buildId=unknown
java.version=11.0.13
java.vendor=Azul Systems, Inc.
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Command-line arguments: -data /home/gitpod/.vscode-remote/data/User/workspaceStorage/4affa720-2/redhat.java/jdt_ws
!ENTRY org.eclipse.jdt.ls.core 1 0 2021-11-24 01:11:26.595
!MESSAGE class org.eclipse.jdt.ls.core.internal.JavaLanguageServerPlugin is started
@mattwelke
mattwelke / error
Last active October 9, 2021 02:03
Javalin and GCP Monitoring with custom runtime issue
[main] INFO io.grpc.netty.shaded.io.netty.util.internal.PlatformDependent - Your platform does not provide complete low-level API for accessing direct buffers reliably. Unless explicitly requested, heap buffer will always be preferred to avoid potential system instability.
[main] INFO io.javalin.Javalin -
__ __ _ __ __
/ /____ _ _ __ ____ _ / /(_)____ / // /
__ / // __ `/| | / // __ `// // // __ \ / // /_
/ /_/ // /_/ / | |/ // /_/ // // // / / / /__ __/
\____/ \__,_/ |___/ \__,_//_//_//_/ /_/ /_/
https://javalin.io/documentation
@mattwelke
mattwelke / gist:8626ac5aee4e2fbfa2c6572594eba898
Created August 21, 2021 01:03
Javalin log message when query string param parsing fails
[qtp247944893-23] INFO io.javalin.Javalin - Parameter 'from' with value '123' is not a valid Instant
[qtp247944893-23] WARN io.javalin.Javalin -
-------------------------------------------------------------------
Missing dependency 'Jackson'. Add the dependency.
pom.xml:
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.12.3</version>
public class Test {
public static void main(String[] args) {
System.out.println("Hello, world!");
}
}
├── CONTRIBUTING.md
├── LICENSE.txt
├── NOTICE.txt
├── README.md
├── build.gradle
├── core
│   ├── java8
│   │   ├── CHANGELOG.md
│   │   ├── Dockerfile
│   │   ├── build.gradle