Skip to content

Instantly share code, notes, and snippets.

View gorlak's full-sized avatar

Geoff Evans gorlak

View GitHub Profile
@gorlak
gorlak / popcount.h
Last active December 23, 2015 13:39
Template meta-program for bit counting of constants
#include <stdint.h>
template< uint32_t x >
struct PopCount
{
static const uint32_t n = PopCount< x / 2 >::n + ( x % 2 );
};
template<>
struct PopCount< 0 >
@gorlak
gorlak / tools-talks.md
Last active September 23, 2024 02:28
gamedev tools (and programming) talks
@gorlak
gorlak / tools-engineer-checklist.md
Last active September 2, 2024 10:34
Tools Engineer Checklist

This list is provided as a guide for tools engineers of all skill levels looking for jobs in the game industry. It's meant as a guide to topics that should be pursued broadly in order to be well spoken in an interview. I doubt any hiring manager requires deep knowedge across every topic, but an ideal candidate would be somewhat knowledgable (aware of its existence if asked directly) with all topics here.

Each list of bullets increases in difficulty, so later bullets are more applicable to senior (or even director) level candidates.

Good luck.

@gorlak

Math

  1. There should be a Client view tab in the main views of the workspace. There are three views in Perforce: Depot view (//depot/...), Client view (//clientspec/...), and Workspace view (X:...). However, there are only two tabs in P4V: Depot and Workspace, and neither of them are ideal for typical workflow. Users are probably most comfortable, organizationally, with the Workspace view because that is how the files are organized on their hard drive. This view is cluttered with local file system files (reinventing the native file browser behavior). A good Client view would be the best of both worlds: only show server-controlled files but organized as they are on the local drive.

  2. Changelist description dialogs seperate the file name and file path into different columns. Have a way to show the full path with name of those files. Elipsize the paths if they are too long for the dialog, deduce a common root to relpath from, or make showing the path optional.

  3. It's not possible to unshelve a +l file alr

### Keybase proof
I hereby claim:
* I am gorlak on github.
* I am gorlak (https://keybase.io/gorlak) on keybase.
* I have a public key ASAhwbQmz65c9FA_NYjQSI5r-zSeVYdFXJrPpimKhOruxQo
To claim this, I am signing this object:
@gorlak
gorlak / build-openssl-win.bat
Last active April 16, 2023 03:07
A simple batch script to build MT/MTd/MD/MDd openssl static libs on windows
@echo off
setlocal
if "%VisualStudioVersion%" equ "" echo Please run this script from a Visual Studio command prompt for the compiler you want to use
if "%VisualStudioVersion%" equ "" exit /b 1
:: make perl.exe available via %PATH%
set PATH=%PATH%;%~dp0..\..\..\game\bin\perl\bin
@gorlak
gorlak / jam-p4.md
Created August 1, 2018 01:14
Building p4 with Jam

jam -sSMARTHEAP=0 -sOSPLAT=X64 -sSSL=no p4

@gorlak
gorlak / p4.exe.md
Created July 19, 2019 17:51
p4.exe ninjitsu

To switch streams:

  1. p4 client
  2. Edit Stream field, skip updating any Views, they will be regenerated
  3. p4 sync > nul to update to #head in the new stream and skip printing gratuitous tty

To prop up a new stream workspace quickly:

  1. Copy your P4CONFIG file from an existing workspace to a new workspace root
  2. Edit it and change the name of the P4CLIENT to be the new workspace name
@echo off
echo Cmdline: %0 %* > %~dpn0.log 2>&1
date /t >> %~dpn0.log 2>&1
time /t >> %~dpn0.log 2>&1
if exist "%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup\%~n0.bat" echo Deleting "%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup\%~n0.bat" >> %~dpn0.log 2>&1
if exist "%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup\%~n0.bat" del "%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup\%~n0.bat" >> %~dpn0.log 2>&1
echo Linking "%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup\%~n0.bat" %~dpnx0 >> %~dpn0.log 2>&1