Skip to content

Instantly share code, notes, and snippets.

@cmalven
cmalven / index.html
Last active April 27, 2024 10:17
Shortest (useful) HTML5 Document
<!-- http://www.brucelawson.co.uk/2010/a-minimal-html5-document/ -->
<!doctype html>
<html lang=en>
<head>
<meta charset=utf-8>
<title>blah</title>
</head>
<body>
<p>I'm the content</p>
@xgp
xgp / Dockerfile
Last active April 23, 2024 13:01
Keycloak 17 example using JGroups JDBC_PING discovery protocol for Infinispan
FROM quay.io/keycloak/keycloak:17.0.0 as builder
ENV KC_METRICS_ENABLED=true
ENV KC_FEATURES=preview
ENV KC_DB=postgres
ENV KC_HTTP_RELATIVE_PATH=/auth
# specify the custom cache config file here
ENV KC_CACHE_CONFIG_FILE=cache-ispn-jdbc-ping.xml
# copy the custom cache config file into the keycloak conf dir
@hamaluik
hamaluik / AABB.hx
Created October 6, 2014 05:38
Continuous collision detection between two moving AABBs using Minkowski differences.
package ;
import openfl.display.Sprite;
/**
* ...
* @author Kenton Hamaluik
*/
class AABB
{
public var center:Vector = new Vector();
@njlr
njlr / raleigh-frame-serial-numbering-system.md
Created August 9, 2016 14:34
The numbering system used for Raleigh bicycle frames

For Your Information: Frame Serial Numbering System

The location of our frame serial numbers will be on the top of the seat tube facing to the rear of the bicycle. This does not apply to models with 531 seat tubes which will be numbered under the bottom bracket. Markings show the source of manufacture, approximate date of manufacture and unique number of each frame manufactured in any 10 year cycle.

Size of letters and numbers 3/16" high, to match diameter of tubes. The complete stamp contains nine digits.

FIRST SYMBOL Denotes Location of Manufacture

Symbol | Location

@jlong
jlong / uri.js
Created April 20, 2012 13:29
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"
@danielrw7
danielrw7 / replify
Last active October 24, 2023 12:03
replify - Create a REPL for any command
#!/bin/sh
command="${*}"
printf "Initialized REPL for `%s`\n" "$command"
printf "%s> " "$command"
read -r input
while [ "$input" != "" ];
do
eval "$command $input"
printf "%s> " "$command"
@jart
jart / blakefiler.py
Last active September 18, 2023 16:22
Turns bazel query --output=build //tensorflow:libtensorflow_framework.so into isomorphic Makefile
# Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@pedroigor
pedroigor / keycloakx-k8s.yaml
Last active August 5, 2022 14:00
Keycloak.X k8s spec
apiVersion: v1
kind: Service
metadata:
name: keycloak-postgres
labels:
service: keycloak
layer: security
spec:
ports:
- port: 5432
@romaninsh
romaninsh / lambda-vpc-internet-access-cloudformation.yml
Last active December 22, 2021 00:26
CloudFormation template implementing Private network which can be used by Serverless to deploy Lambda into VPCs an maintaining internet access
# Add the following to your existing VPC CF stack
# create 2 subnets, lambdas like to be in multiple subnets
Private1:
Type: AWS::EC2::Subnet
Properties:
VpcId: !Ref VPC
AvailabilityZone: !Select [ 0, !GetAZs ]
CidrBlock: !Ref Private1CIDR
@ViViDboarder
ViViDboarder / FilcoTweaks.ahk
Created December 31, 2012 14:48
Some hotkeys designed for my Filco Majestouch 2
;-- On Startup
vol_Step = 3
;-- Hotkeys
;-- Volume adjust
HotKey #PgUp, volUp ; Win+Page Up
HotKey #PgDn, volDn ; Win+Page Down
HotKey #End, volMute ; Win+End
;-- Browser Navigation
HotKey !#Left, browserBack ; Ctrl+Win+Left