Skip to content

Instantly share code, notes, and snippets.

@JabDoesThings
JabDoesThings / BitwiseOps.java
Created May 10, 2024 16:40
Bitwise Ops Support for Project Zomboid (Build 41.78.16)
package com.asledgehammer.craftnail.util;
public class BitwiseOps {
public static byte bnot8(long value) {
return (byte) ~(byte) value;
}
public static byte band8(long value, long mask) {
return (byte) ((byte) value & (byte) mask);
@ruvnet
ruvnet / swarm_intelligence.md
Created April 28, 2024 00:47
Autonomous Swarm Intelligence

Autonomous Swarm Intelligence:

Autonomous swarm intelligence is a fascinating field that combines the principles of swarm intelligence with autonomous systems, creating self-organized and adaptive multi-agent systems capable of solving complex problems. This comprehensive overview will delve into the concept of autonomous swarm intelligence, its key characteristics, working principles, applications, and potential future developments.

Introduction to Autonomous Swarm Intelligence

Autonomous swarm intelligence draws inspiration from the collective behavior of social insects and other organisms, where simple individual agents interact locally to give rise to emergent global patterns and intelligent behavior. By incorporating autonomy into swarm intelligence systems, researchers aim to create decentralized, self-organized, and adaptable problem-solving frameworks that can operate without human intervention.

Key Characteristics of Autonomous Swarm Intelligence

@Akhil-Suresh
Akhil-Suresh / postman_installation.md
Last active May 10, 2024 16:40
Installing Postman on Ubuntu/Debian

Installing Postman

Step 1

If any version of postman is installed we need to remove it

sudo rm -rf /opt/Postman

Step 2

@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active May 10, 2024 16:39
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@nicoplv
nicoplv / 0-UnityScriptTemplates.info
Last active May 10, 2024 16:39
List of C# Script Templates for Unity 3D
List of C# Script Templates for Unity 3D:
81-C#__Behavior-NewBehaviour.cs.txt
81-C#__BehaviorListed-NewBehaviourListed.cs.txt
81-C#__Class-NewClass.cs.txt
81-C#__Interface-NewInterface.cs.txt
81-C#__ScriptableObject-NewScriptableObject.cs.txt
@dannberg
dannberg / obsidian-daily-note-template.txt
Last active May 10, 2024 16:39
Dann Berg's Daily Note Template for Obsidian. Uses Dataview & Templater plugins. Should be saved as a Markdown file in Obsidian. Read the full tour: https://dannb.org/blog/2022/obsidian-daily-note-template/
---
created: <% tp.file.creation_date() %>
---
tags:: [[+Daily Notes]]
# <% moment(tp.file.title,'YYYY-MM-DD').format("dddd, MMMM DD, YYYY") %>
<< [[Timestamps/<% tp.date.now("YYYY", -1) %>/<% tp.date.now("MM-MMMM", -1) %>/<% tp.date.now("YYYY-MM-DD-dddd", -1) %>|Yesterday]] | [[Timestamps/<% tp.date.now("YYYY", 1) %>/<% tp.date.now("MM-MMMM", 1) %>/<% tp.date.now("YYYY-MM-DD-dddd", 1) %>|Tomorrow]] >>
---
@rsola
rsola / deldxredist.cmd
Last active May 10, 2024 16:38
Remove DirectX redist components
@echo off
REM This command-line interpreter batch file removes all of the DirectX
REM redistributable DLLs from SysWOW64 (64-bit Windows only) and System32
REM folders. It should be used as a last resort to troubleshoot versioning
REM issues and processor architecture conflicts. No output is given.
REM Must be run with administrator privileges (elevated). It will fail
REM silently otherwise.
REM You should restore the delete files by using the DirectX End-User
@mattes
mattes / rails-google-compute-deploy.md
Last active May 10, 2024 16:37
My own Heroku in 30 mins

Deploy Rails apps to Google Cloud Compute Engine

  • Zero Downtime
  • Graceful shutdowns
  • Via Github Actions
  • Zero infrastructure management overhead

Overview

The general idea is to have Github Actions test, build and deploy a Rails app to Google Cloud Compute Engine.

@Shrugsy
Shrugsy / rtkQueryCacheUtils.ts
Last active May 10, 2024 16:35
RTK Query cache utils. Useful abstractions for creating `provides`/`invalidates` cache data tags against endpoints.
import { FetchBaseQueryError } from '@rtk-incubator/rtk-query/dist';
/**
* Default tags used by the cacher helpers
*/
const defaultTags = ["UNAUTHORIZED", "UNKNOWN_ERROR"] as const;
type DefaultTags = typeof defaultTags[number];
function concatErrorCache<T, ID>(
existingCache: CacheList<T, ID>,
@matthewjberger
matthewjberger / configuration.nix
Created June 22, 2021 03:52
/etc/nixos/configuration.nix minimal configuration for using kde plasma
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix