Skip to content

Instantly share code, notes, and snippets.

View kardolus's full-sized avatar
🔥
crushing it

Guillermo Kardolus kardolus

🔥
crushing it
View GitHub Profile
@Override
public synchronized void init( ServletConfig servletConfig ) throws ServletException {
GatewayConfig gatewayConfig = (GatewayConfig) servletConfig.getServletContext().getAttribute(GatewayConfig.GATEWAY_CONFIG_ATTRIBUTE);
isErrorMessageSanitizationEnabled = gatewayConfig.isErrorMessageSanitizationEnabled();
errorMessageSanitizationPattern = gatewayConfig.getErrorMessageSanitizationPattern();
try {
if( filter == null ) {
filter = createFilter( servletConfig );
}
filterConfig = new FilterConfigAdapter( servletConfig );
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>TapMedia</title>
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
<style>
.testimonial {
display: flex;
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>TapMedia</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<style>
body {
font-family: Arial, sans-serif;
@kardolus
kardolus / gist:d0a93bff8bdabf4b9d5360ecf259d2ee
Created June 11, 2023 19:52
Apple script for ChatGPT interaction
tell application "System Events"
keystroke "a" using {command down}
delay 0.1
keystroke "c" using {command down}
delay 0.1
key code 122 using {command down} -- the F1 key
end tell
@kardolus
kardolus / goland
Created November 15, 2022 16:03
IntelliJ scripts
#!/bin/sh
open -na "GoLand.app" --args "$@"
package postgres
import (
"database/sql"
"github.com/lib/pq"
"time"
)
type TransactionRecord struct {
ID string `db:"id"`
@kardolus
kardolus / application.yml
Last active November 11, 2020 21:37
Sam jamsession
cors:
whitelist:
- https://localhost:3000
- https://marketplug.app
alpaca:
schedule:
start: 9
close: 19
@kardolus
kardolus / bitmask_runes.go
Created October 11, 2020 13:59
Sometimes you need to convert runes to an index in an []int with size 26. And you need to convert back.
func rune2Index(r rune) int {
return int(r) - int('a')
}
func index2Rune(i int) rune {
return rune(i) + 'a'
}
package client_test
import (
"math"
"testing"
)
func TestUnitClient(t *testing.T) { // go test will hit this method
t.Run("Client Test", testClient)
}
### Usage: kong.sh [--no-db]
###
### - Run kong with an in memory database
### kong.sh --no-db
###
### - Run kong with postgre
### kong.sh
print_usage() {
awk -F'### ' '/^###/ { print $2 }' "$0"