Skip to content

Instantly share code, notes, and snippets.

View timoxley's full-sized avatar

Tim Kevin Oxley timoxley

View GitHub Profile
@Innf107
Innf107 / data.md
Last active October 15, 2024 07:10
Programming is about information not data, or: you might not need dependent types

Programming is about information not data, or: you might not need dependent types

When I took "Fundamentals of Computer Science" in college, my professor was very adamant about the distinction between data and information and about how data doesn't have any inherent meaning. At the time, it seemed a bit silly to me how much emphasis he put on such a seemingly insignificant difference.

In retrospect, I think he was exactly right about this and I wish more programmers took it to heart.

Data is something you can store in a computer, such as, let's say, the byte 0b01000001.

@echo off
NET SESSION >nul 2>&1
IF %ERRORLEVEL% NEQ 0 GOTO ELEVATE >nul
GOTO ADMINTASKS
:ELEVATE
CD /d %~dp0 >nul
MSHTA "javascript: var shell = new ActiveXObject('shell.application'); shell.ShellExecute('%~nx0', '', '', 'runas', 1);close();" >nul
EXIT
@MilkyEngineer
MilkyEngineer / Minimal-5.2.uproject
Last active November 8, 2024 06:27
Minimal project descriptor that "Disables Engine Plugins by Default" for Unreal Engine
{
"FileVersion": 3,
"EngineAssociation": "5.2",
"Description": "Minimum viable plugin dependencies for a usable Unreal Engine project",
"DisableEnginePluginsByDefault": true,
"Plugins": [
{
"Name": "PluginBrowser",
"Enabled": true
},
@Solessfir
Solessfir / AdvancedLog.h
Last active August 19, 2024 19:00
Unreal Engine Advanced Log with automatic type deduction
#pragma once
/** Current Class and Line Number where this is called */
#define LOG_FUNC_LINE (FString(__FUNCTION__) + " (Line: " + FString::FromInt(__LINE__) + ")")
/**
* Usage:
* ADVANCED_LOG("Actor name is: {0}", AnyActorPointer);
* No need for GetName() or ToString(), etc. Type will be automatically deduced
*/
@KingKrouch
KingKrouch / MyProblemsWithUnrealEngine.md
Last active November 12, 2024 22:34
My problems with Unreal Engine and how developer and PC oriented features have been neglected over the years.

Here's my biggest issues with Unreal Engine at the moment, and subsequently, games (especially UE games on PC) that use it:

  • For starters, the default settings for Unreal projects are hilariously bad, some of which are exposed deep in the editor settings, the others requiring config tweaks on the developer's side.
    For example, every Unreal Engine project ships with Vert- FOV scaling by default (As a massive middle finger to ultrawide users, despite how trivial it is to fix), and also has mouse smoothing and sensitivity that scales based on the FOV enabled (resulting in mouse input feeling wonky, this was actually one big complaint people had with Atomic Heart's release). The former is a problem because it causes the FOV to zoom in the wider the resolution aspect ratio *(While keeping the intended horizontal space by ad
@martinrue
martinrue / serve.js
Created March 18, 2021 16:49
Using esbuild's serve function for an SPA, equivalent to webpack's `devServer.historyApiFallback`.
const http = require("http");
const esbuild = require("esbuild");
const serve = async (servedir, listen) => {
// Start esbuild's local web server. Random port will be chosen by esbuild.
const { host, port } = await esbuild.serve({ servedir }, {});
// Create a second (proxy) server that will forward requests to esbuild.
const proxy = http.createServer((req, res) => {
// forwardRequest forwards an http request through to esbuid.
@berkanuslu
berkanuslu / ue4-clean-vs-project-files.bat
Created October 27, 2020 10:29
It cleans Binaries, Build, Intermediate, Saved, and DerivedDataCache folders for your Unreal Engine 4 project and all plugins that you have.
@echo off
echo *********************************************************************************************************************
echo ******************************************** Clean Unreal Engine Project ********************************************
echo *********************************************************************************************************************
echo.
:PROMPT
SET /P AREYOUSURE=Are you sure to delete all Binaries, Build, Intermediate, Saved and DerivedDataCache folders in your project and plugins (y/[N])?
IF /I "%AREYOUSURE%" NEQ "y" GOTO END
echo.
echo Cleaning your project, please wait...
@nolanlawson
nolanlawson / parens-and-perf-counterpost.md
Last active August 14, 2023 20:08
"Parens and Performance" – counterpost

"Parens and Performance" – counterpost

Kyle Simpson (@getify) wrote a very thoughtful post decrying optimize-js, which is a tool I wrote that exploits known optimizations in JavaScript engines to make JS bundles parse faster (especially minified bundles, due to what could be reasonably described as a bug in Uglify).

Kyle lays out a good case, but I tend to disagree with nearly all his points. So here's my rebuttal.

@nzakas
nzakas / githubpainpoints.md
Created June 30, 2016 18:47
An overview of my pain points with GitHub

GitHub Pain Points

This is my feedback on using GitHub to manage a popular project (ESLint). Topics are presented in no particular order. In general, everything I say about issues also refers to pull requests.

For each problem I've suggested a solution. I realize that actually building out a solution is a complex process and my suggestions do not reach the level of detail sufficient for implementation purposes. It's just to give you an idea of the direction I'm thinking.

Problem: No good way to distinguish new issues from "accepted" issues

Users are opening new issues every day, and these issues automatically bubble to the top of the issues list by default. We do label issues that we're committed to doing as "accepted", but if there are enough new issues, you don't even see those until the second page of issues. Why is this a problem? In a word: distraction.

@timoxley
timoxley / Readme.md
Last active June 7, 2016 07:27
JS Pop Quiz: How well do you know your functions?

JS Pop Quiz: How well do you know your functions?

Given an Array of Functions fns, what argument(s) can you pass to fns.forEach such that each function in fns will execute, in order, without creating any anonymous (or named) functions or invoking the Function constructor?

Conditions

  • Do not use the function keyword, or arrow functions () => .
  • Do not invoke the Function constructor.
  • Do not use method definitions.
  • Function#bind & friends on the Function.prototype are ok.