Skip to content

Instantly share code, notes, and snippets.

@turicas
turicas / filter_log.py
Last active April 28, 2022 03:00
Parse HTTP access log files, extract unique user agents (unique per file) and export to CSV
import argparse
import csv
import rows
parser = argparse.ArgumentParser()
parser.add_argument("input_filename")
parser.add_argument("output_filename")
args = parser.parse_args()
@artemious7
artemious7 / Serilog.LoggerStringInterpolationExtensions.cs
Last active September 16, 2021 00:32
C# Serilog: how to log with String interpolation and keep argument names in message templates
#region MIT License
//Copyright(c) 2020 Artemious
// https://gist.github.com/artemious7/c7d9856e128a8b2e9e92d096ca0e69ee/
// https://stackoverflow.com/questions/61816775/c-sharp-serilog-how-to-log-with-string-interpolation-and-keep-argument-names-in/61816776#61816776
//Permission is hereby granted, free of charge, to any person obtaining a copy
//of this software and associated documentation files (the "Software"), to deal
//in the Software without restriction, including without limitation the rights
//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
//copies of the Software, and to permit persons to whom the Software is
@raysan5
raysan5 / custom_game_engines_small_study.md
Last active April 11, 2024 14:34
A small state-of-the-art study on custom engines

CUSTOM GAME ENGINES: A Small Study

a_plague_tale

A couple of weeks ago I played (and finished) A Plague Tale, a game by Asobo Studio. I was really captivated by the game, not only by the beautiful graphics but also by the story and the locations in the game. I decided to investigate a bit about the game tech and I was surprised to see it was developed with a custom engine by a relatively small studio. I know there are some companies using custom engines but it's very difficult to find a detailed market study with that kind of information curated and updated. So this article.

Nowadays lots of companies choose engines like Unreal or Unity for their games (or that's what lot of people think) because d

@marcosnils
marcosnils / awsmfa.sh
Last active March 19, 2021 17:34
Simple script to use MFA using AWS cli.
#!/bin/bash
# shellcheck disable=SC2102
set -euo pipefail
renew_creds() {
unset AWS_ACCESS_KEY_ID
unset AWS_SECRET_ACCESS_KEY
unset AWS_SESSION_TOKEN
@mzaks
mzaks / ComponentAnalyzerWindow.cs
Created September 26, 2019 16:04
A small Unity3D editor window to explore component sizes and find issues in component field layout
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Reflection;
using System.Runtime.InteropServices;
using Unity.Collections.LowLevel.Unsafe;
using UnityEditor;
using UnityEditor.IMGUI.Controls;
using UnityEngine;
using Unity.Entities;
@LotteMakesStuff
LotteMakesStuff / AutohookAttribute.cs
Last active January 2, 2024 13:54
[Autohook] property drawer for unity - Add this [Autohook] attribute to a property to and the inspector will automagically hook up a valid reference for you if it can find a component attached to the same game object that matches the field you put it on. You can watch a demo of this in action here https://youtu.be/faVt09NGzws <3
// NOTE DONT put in an editor folder!
using UnityEngine;
public class AutohookAttribute : PropertyAttribute
{
}
@xenogenesi
xenogenesi / Makefile
Last active November 19, 2021 03:28
create self signed certificates
DOMAIN ?= mydomain.com
COUNTRY := IT
STATE := IT
COMPANY := Evil Corp.
# credits to: https://gist.github.com/fntlnz/cf14feb5a46b2eda428e000157447309
# usage:
@holmberd
holmberd / linux-kill-pts.md
Last active February 11, 2024 12:57
Kill tty/pts sessions in Linux

Kill user tty/pts sessions in Linux

Commands

  • w: show who is logged on and what they are doing
  • who: show who is logged on
  • tty: show current users pseudo terminal
  • ps -ft pts/1: get process id for the pseudo terminal
  • pkill: signal process based on name and other attributes
@kevinelliott
kevinelliott / 1-macOS-10.14-mojave-setup.md
Last active April 2, 2023 11:46
macOS 10.14 Mojave Mostly-Automated Setup

To support my open-source work, consider adding me on Patreon.

macOS 10.14 Mojave Mostly-Automated Setup

An easy to refer to document for regularly setting up macOS 10.14 Mojave.

Controversy

The topic of recipe-based frequent fresh reinstalls of macOS is a controversial issue. Some people are against reinstalling macOS, citing that they have never had an issue with Apple provided upgrade installs.

@PranavSK
PranavSK / .gitattributes
Last active March 10, 2022 10:08 — forked from nemotoo/.gitattributes
.gitattributes for Unity3D with git-lfs
# Unity
*.cs diff=csharp text
*.cginc text
*.shader text
# Unity YAML
*.mat merge=unityyamlmerge eol=lf
*.anim merge=unityyamlmerge eol=lf