Skip to content

Instantly share code, notes, and snippets.

@realvjy
realvjy / ChoasLinesShader.metal
Last active April 19, 2024 20:01
Choas Lines - Metal Shader
// Lines
float hash( float n ) {
return fract(sin(n)*753.5453123);
}
// Slight modification of iq's noise function.
float noise(vector_float2 x )
{
vector_float2 p = floor(x);
vector_float2 f = fract(x);
@alexkates
alexkates / how-to-trigger-lambda-from-sqs-stack.ts
Last active April 19, 2024 20:00
How to Trigger an AWS Lambda from SQS using the AWS CDK
// Import aws-cdk packages
import * as cdk from '@aws-cdk/core';
import * as sqs from '@aws-cdk/aws-sqs';
import * as lambda from '@aws-cdk/aws-lambda';
import * as lambdaEventSources from '@aws-cdk/aws-lambda-event-sources';
export class HowToTriggerLambdaFromSqsStack extends cdk.Stack {
constructor(scope: cdk.Construct, id: string, props?: cdk.StackProps) {
super(scope, id, props);
@rkeithhill
rkeithhill / Optimize-PSReadlineHistory.ps1
Last active April 19, 2024 20:00
Removes duplicate and optionally short commands from your PSReadline history file
<#
.SYNOPSIS
Optimizes your PSReadline history save file.
.DESCRIPTION
Optimizes your PSReadline history save file by removing duplicate
entries and optionally removing commands that are not longer than
a minimum length
.EXAMPLE
C:\PS> Optimize-PSReadlineHistory
Removes all the duplicate commands.
@qoomon
qoomon / conventional_commit_messages.md
Last active April 19, 2024 20:00
Conventional Commit Messages

Conventional Commit Messages

See how a minor change to your commit message style can make a difference.

Tip

Have a look at git-conventional-commits , a CLI util to ensure these conventions and generate verion and changelogs

Commit Message Formats

Default

@siresorose
siresorose / currency-format-input-field.markdown
Created March 29, 2023 22:43
Currency Format Input Field

Currency Format Input Field

Auto format currency input field with commas and decimals if needed. This is how I would personally expect one to work. Works left to right without forcing user to enter 00 cents if there is none. Text is automatically formatted with commas and cursor is placed back where user left off after formatting vs cursor moving to the end of the input. Validation is on KeyUp and a final validation is done on blur.

A Pen by Wade Williams on CodePen.

License.

@magnetikonline
magnetikonline / README.md
Last active April 19, 2024 19:59
Enable LDAP over SSL (LDAPS) for Microsoft Active Directory servers.

Enable LDAP over SSL (LDAPS) for Microsoft Active Directory servers

Microsoft active directory servers will default to offer LDAP connections over unencrypted connections (boo!).

The steps below will create a new self signed certificate appropriate for use with and thus enabling LDAPS for an AD server. Of course the "self-signed" portion of this guide can be swapped out with a real vendor purchased certificate if required.

Steps have been tested successfully with Windows Server 2012R2, but should work with Windows Server 2008 without modification. Requires a working OpenSSL install (ideally Linux/OSX) and (obviously) a Windows Active Directory server.

@bmaupin
bmaupin / free-backend-hosting.md
Last active April 19, 2024 19:57
Free backend hosting
@n1snt
n1snt / Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md
Last active April 19, 2024 19:57
Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md

Oh my zsh.

Oh My Zsh

Install ZSH.

sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh

Install Oh my ZSH.

@markasoftware
markasoftware / enterprise_token.rb
Last active April 19, 2024 19:56
OpenProject Enterprise mode for free
############ REPLACE app/models/enterprise_token.rb in the source code with this file! ################
############ also be sure to RESTART OpenProject after replacing the file. ################
############ it doesn't show that enterprise mode is enabled in the settings, but all ################
############ enterprise mode features, such as KanBan boards, are enabled. ################
#-- copyright
# OpenProject is an open source project management software.
# Copyright (C) 2012-2023 the OpenProject GmbH
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License version 3.
@andreasonny83
andreasonny83 / RELEASE-NOTES.md
Last active April 19, 2024 19:53
Release Notes Template

Release Notes Template

Based off https://palantir.quip.com/pzRwAVr1bpzf

Pro-tip: look through the github diff between the previous release to see what's changed. The commit titles should give an outline of what's happened.

Upgrade Steps

  • List out, as concretely as possible, any steps users have to take when they upgrade beyond just dumping the dependency.
  • Write pseudocode that highlights what code should change and how.