Skip to content

Instantly share code, notes, and snippets.

View JJL772's full-sized avatar
:octocat:
:trollface: :trollface: :trollface: :trollface:

Jeremy L. JJL772

:octocat:
:trollface: :trollface: :trollface: :trollface:
View GitHub Profile
@JJL772
JJL772 / how-to-run-p2ce-hammer-in-wine.txt
Created January 23, 2022 19:37
P2CE Hammer in WINE
1. Obtain a sufficiently new version of WINE.
Any version >= 6.0 should work. You may need to build this from source if your distro doesn't offer up to date packages for it.
Ubuntu and Mint users can read this page for how to install new versions of wine: https://github.com/Winetricks/winetricks/pull/1873
2. Install wintricks.
This is technically optional, if you want to install things manually skip this and move onto the next step.
Winetricks can usually be obtained through your distro's package manager. `winetricks --self-update` can be
used to update it to the latest version.
@JJL772
JJL772 / lab.py
Created January 17, 2022 07:02
lab1.py
#!/usr/bin/env python
from mininet.topo import Topo
from mininet.net import Mininet
from mininet.cli import CLI
class Lab1Topology(Topo):
def __init__(self):
Topo.__init__(self)
@JJL772
JJL772 / expr.h
Created August 13, 2021 09:14
quick & dirty boolean expression evaluator
/* Simple logical expression evaluator */
#pragma once
#include <ctype.h>
#include <stdio.h>
#include <memory.h>
#define PARAM_MAX (('Z' - 'A')+1)
@JJL772
JJL772 / .gitignore
Created July 2, 2021 11:55
Gitignore for EPICS stuff
# Ignore certain bad files
.vscode/
.vscode/ipch
bin/
lib/
__pycache__
*.o
*.a
*.so
*.d
@JJL772
JJL772 / run-p2ce-hammer.sh
Created March 24, 2021 15:32
runs p2ce hammer on linux
#!/bin/sh
export STEAM_COMPAT_DATA_PATH="$HOME/.config/ChaosSDKLauncher/pfx/"
export PROTON_USE_WINED3D=1
export SteamGameId=440000
export STEAM_COMPAT_CLIENT_INSTALL_PATH="$HOME/.steam"
export PROTON_DIR="/media/ExtraDisk/SteamLibrary/steamapps/common/Proton 5.0"
"$PROTON_DIR/proton" run bin/win64/hammer.exe -game p2ce $@
@JJL772
JJL772 / platformtest.h
Last active June 15, 2022 06:19
Somewhat comprehensive list of feature test macros for C/C++. Leave a comment if I forgot anything
// Compile time info
#pragma once
//==========================================================//
// Feature test macros. Enjoy (or not)
//==========================================================//
// FORBID_XXX stuff is used to force disable various intrinsics
// See the OS_XXX section (near the bottom) to find which OS you're using
#if ( defined(__AVX__) ) && !( defined(FORBID_SIMD) || defined(FORBID_AVX) )
@JJL772
JJL772 / .clang-format
Created January 7, 2021 22:46
UNEDITED Microsoft style for Clang-format
---
Language: Cpp
# BasedOnStyle: Microsoft
AccessModifierOffset: -2
AlignAfterOpenBracket: Align
AlignConsecutiveMacros: false
AlignConsecutiveAssignments: false
AlignConsecutiveBitFields: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: Right
@JJL772
JJL772 / vpc.vim
Created December 20, 2020 10:16
Syntax highlighting for VPC scripts in vim
" Vim Syntax file for VPC (Valve Project Creator) files
" Author: JJL77
" Common keys
syn match vpcCommand "\$ImpLib"
syn match vpcCommand "\$ImportLibrary"
syn match vpcCommand "\$AdditionalDependencies"
syn match vpcCommand "\$POSIX_RPaths"
syn match vpcCommand "\$SymbolVisibility"
syn match vpcCommand "\$AdditionalOutputFiles"
@JJL772
JJL772 / msvc-extensions.txt
Last active October 7, 2020 12:04
List of good ol MSVC-specific extensions... And some other stuff with VC/VC++
r-value to l-value binding.
template specialization in the class scope. (Normally this must be done at namespace scope, so not in a class!)
template specialization without the template<> keyword
function template partial specialization
explicit template specializations can have storage classes (e.g. explicit specialization on static function)
@JJL772
JJL772 / .clang-format
Last active October 1, 2020 03:12
Clang format for the source engine
---
BasedOnStyle: Microsoft
FixNamespaceComments: 'true'
IndentCaseLabels: 'true'
IndentPPDirectives: BeforeHash
IndentWidth: '4'
NamespaceIndentation: All
PointerAlignment: Left
SortIncludes: 'false'
Standard: Cpp11