Skip to content

Instantly share code, notes, and snippets.

@linuxmalaysia
linuxmalaysia / sysctl-conf.txt
Created June 7, 2020 02:33
sysctl.conf for elasticsearch node
vm.max_map_count=262144
net.core.default_qdisc = fq
net.ipv4.tcp_congestion_control = bbr
net.ipv4.tcp_notsent_lowat = 16384
net.core.somaxconn = 4096
# Increase size of file handles and inode cache
fs.file-max = 20971520
# Do less swapping
@matthewjberger
matthewjberger / instructions.md
Last active April 2, 2025 08:05
Install a nerd font on ubuntu

1.) Download a Nerd Font

2.) Unzip and copy to ~/.fonts

3.) Run the command fc-cache -fv to manually rebuild the font cache

@maratori
maratori / .golangci.yml
Last active April 2, 2025 08:05
Golden config for golangci-lint
# This file is licensed under the terms of the MIT license https://opensource.org/license/mit
# Copyright (c) 2021-2025 Marat Reymers
## Golden config for golangci-lint v2.0.2
#
# This is the best config for golangci-lint based on my experience and opinion.
# It is very strict, but not extremely strict.
# Feel free to adapt it to suit your needs.
# If this config helps you, please consider keeping a link to this file (see the next comment).
@DrustZ
DrustZ / Simulation.cs
Created May 15, 2019 23:44
Simulate keyboard and mouse input in WPF (similar to sendkeys in winform)
using System;
using System.ComponentModel;
using System.Drawing;
using System.Linq;
using System.Runtime.InteropServices;
using System.Security;
using System.Security.Permissions;
using System.Windows.Input;
namespace Demo
<?php
/*
Made by Kudusch (blog.kudusch.de, kudusch.de, @Kudusch)
---------
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
@samirahmed
samirahmed / errorcodes.m
Created November 13, 2014 18:13
NSURLErrorDomain codes
kCFURLErrorUnknown = -998,
kCFURLErrorCancelled = -999,
kCFURLErrorBadURL = -1000,
kCFURLErrorTimedOut = -1001,
kCFURLErrorUnsupportedURL = -1002,
kCFURLErrorCannotFindHost = -1003,
kCFURLErrorCannotConnectToHost = -1004,
kCFURLErrorNetworkConnectionLost = -1005,
kCFURLErrorDNSLookupFailed = -1006,
kCFURLErrorHTTPTooManyRedirects = -1007,
@paulirish
paulirish / what-forces-layout.md
Last active April 2, 2025 07:56
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@bitinn
bitinn / .a-unity-git-config.md
Last active April 2, 2025 07:53
My Unity git config
@solrevdev
solrevdev / chatgpt-prompt-gen.txt
Last active April 2, 2025 07:53
A chat gpt prompt generator
I want you to become my Prompt Creator.
Your goal is to help me craft the best possible prompt for my needs.
The prompt will be used by you, ChatGPT.
You will follow the following process:
1.
@Yoshiin
Yoshiin / template.json
Last active April 2, 2025 07:47
Portainer Templates v3 [WIP]
This file has been truncated, but you can view the full file.
{
"version": "2",
"templates": [
{
"type": 1,
"name": "zeebe_broker",
"title": "Zeebe Standalone Broker",
"description": "Zeebe workflow engine with a single broker",
"categories": [