Skip to content

Instantly share code, notes, and snippets.

@qoomon
qoomon / conventional-commits-cheatsheet.md
Last active December 25, 2024 04:59
Conventional Commits Cheatsheet

Conventional Commit Messages starline

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, determine version and generate changelogs

Commit Message Formats

Default

@MaximumADHD
MaximumADHD / Animate.lua
Last active December 25, 2024 04:57
Rewrite of Roblox's Animate script to be more flexible/robust and easier to read.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Animate
-- maximum_adhd
-- September 21st, 2022
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
--!strict
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
@MaximumADHD
MaximumADHD / new_class.lua
Created April 13, 2023 17:28
Template for creating a snippet plugin with one argument in Roblox Studio.
local ScriptEditorService = game:GetService("ScriptEditorService")
local SNIPPET_NAME = "new_class"
local SNIPPET_DESC = "Create a new prototype class with an export type defined!"
local SNIPPET = table.concat({
"local ${1:%s} = {}",
"${1}.__index = ${1}",
"",
"export type Class = typeof(setmetatable({} :: {",
@MaximumADHD
MaximumADHD / SelectionGet.lua
Created April 13, 2023 20:36
Autocompletes _# with game.Selection:Get()[#] in Roblox Studio's command bar.
--!strict
local ScriptEditorService = game:GetService("ScriptEditorService")
local ALIAS = "game.Selection:Get()[%s]"
type AutocompleteItem = {
label: string,
kind: Enum.CompletionItemKind?,
tags: {Enum.CompletionItemTag}?,
detail: string?,
{
"name": "NuPhy Air60 V2",
"vendorProductId": 435499605,
"macros": [
"{+KC_LSFT}{+KC_LGUI} {-KC_LSFT}{-KC_LGUI}",
"{KC_LGUI} ",
"{+KC_LSFT} ",
"",
"",
"",
@MaximumADHD
MaximumADHD / RunContext.luau
Last active December 25, 2024 04:56
RunContext - What's the running context of your code?
--!strict
local UserInputService = game:GetService("UserInputService")
local GuiService = game:GetService("GuiService")
local RunService = game:GetService("RunService")
local VRService = game:GetService("VRService")
local isEdit = false
local isServer = RunService:IsServer()
local isClient = RunService:IsClient()
@viucitfidat801
viucitfidat801 / IntelliJ IDEA Keygen
Created October 10, 2024 23:41
IntelliJ IDEA 2024.3.3 Crack with Activation Code [Latest 2024]
IntelliJ IDEA License Key

Parachain 众筹拍卖模块

流程

  • 管理员创建众筹 crowdfund::create
    • 参数
      • orign: Origin
        • 要求 Signed ,任何账号都可以发起众筹
      • cap: Balance
  • 最多可以筹得的硬顶
@mariaxia
mariaxia / geneticAlgo.md
Last active December 25, 2024 04:50
Tutorial: coding a very basic genetic algorithm

Let’s implement a genetic algorithm together.

Genetic algorithms solve optimization problems. If you think about the trajectory of our evolution as a species, you can argue that our evolution is in the midst of (hopefully) solving the optimization problem of thriving on planet Earth. Genetic algorithms in programming mimic the biological processes of natural selection in order to generate optimal solutions, ideally for a problem whose solution we can’t figure out any other way.

For now, let’s implement a very contrived example. Let’s turn qfklcqnmroa into hello world.

In other words, we want the following code to execute:

geneticString('qfklcqnmroa', 'hello world') 
@camel-cdr
camel-cdr / rvv-gap.md
Last active December 25, 2024 04:50
RISC-V Vector Extension for Integer Workloads: An Informal Gap Analysis

RISC-V Vector Extension for Integer Workloads: An Informal Gap Analysis

Note: To verify my RVI membership and idenity on this otherwise semi anonymous account: I'm Olaf Bernstein, you should be able to view my sig-vector profile, if you are a member of the vector SIG.

The goal of this document is to explore gaps in the current RISC-V Vector extensions (standard V, Zvbb, Zvbc, Zvkg, Zvkn, Zvks), and suggest instructions to fill these gaps. My focus lies on application class processors, with the expectation that suggested instructions would be suitable to become mandatory or optional instructions in future profiles.

I'll assume you are already familiar with RVV, if not, here is a great introduction and here the latest RISC-V ISA manual.