Skip to content

Instantly share code, notes, and snippets.

version: '3.4'
services:
sql.data:
image: mcr.microsoft.com/mssql/server:2017-latest
container_name: dev_sql
environment:
- SA_PASSWORD=yourStrong(!)Password
- ACCEPT_EULA=Y
healthcheck:
@wojteklu
wojteklu / clean_code.md
Last active May 1, 2024 23:47
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@qoomon
qoomon / conventional_commit_messages.md
Last active May 1, 2024 23:46
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

@InternetUnexplorer
InternetUnexplorer / reactor.lua
Created May 15, 2022 00:05
ComputerCraft program to control a Mekanism fission reactor
local state, data, reactor, turbine, info_window, rules_window
local STATES = {
READY = 1, -- Reactor is off and can be started with the lever
RUNNING = 2, -- Reactor is running and all rules are met
ESTOP = 3, -- Reactor is stopped due to rule(s) being violated
UNKNOWN = 4, -- Reactor or turbine peripherals are missing
}
------------------------------------------------
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active May 1, 2024 23:36
set -e, -u, -o, -x pipefail explanation
@davidteren
davidteren / Rails, Puma & Nginx.md
Last active May 1, 2024 23:35
Example setup for Puma with Nginx in a Rails app

In the apps config/puma.rb file:

Change to match your CPU core count
# Check using this on the server => grep -c processor /proc/cpuinfo
workers 4

# Min and Max threads per worker
threads 1, 6

app_dir = File.expand_path('../..', FILE)

@SUPERCHIEFYT
SUPERCHIEFYT / loggingbots.md
Last active May 1, 2024 23:34
Breakdown of all of the known logging bots. (If I missed any let me know and I'll add it)
  • You can still selfhost the bot (view selfhosting-guide in the support server)

Selfhosted Loggers:

INFO The only selfhosted Loggers listed here will be from trusted members of the Logger support server. If you're selfhosting and a trusted member and want your selfhosted Logger to be listed then we'll reach out to you directly, don't ask to be listed here.
#!/usr/bin/env bash
# Abort sign off on any error
set -e
# Start the benchmark timer
SECONDS=0
# Repository introspection
OWNER=$(gh repo view --json owner --jq .owner.login)
@jpremji
jpremji / gist:0db35816362d20c7afd805aad02e0d54
Created August 3, 2018 02:35
Outlook GAL (Global Address List) Export
#initialize the Outlook application
[Microsoft.Office.Interop.Outlook.Application] $outlook = New-Object -ComObject Outlook.Application
#store all values from the default GAL to $entries
$entries = $outlook.Session.GetGlobalAddressList().AddressEntries
#declare array outside of the loop
$object = @()
#loop through all entries retrieved
@jerodg
jerodg / windows_and_office_kms_setup.adoc
Last active May 1, 2024 23:30
Activate Windows and Office Using KMS Server

Microsoft Windows and Office KMS Setup