Skip to content

Instantly share code, notes, and snippets.

@hemebond
hemebond / fteqcc_manual.md
Last active May 10, 2023 13:03
FTEQCC Manual

FTEQCC Documentation

Contents by David Walton and Marco Hladik. Edited and compiled by Marco Hladik.

Last updated: 10th August 2018, 9:21 PM GMT

Overview

@hemebond
hemebond / parallel-podtemplates.groovy
Last active June 10, 2021 10:29
Jenkinsfile Groovy Examples
def environments = ["development", "staging", "production"]
stage("deploy to multiple environments") {
def deployments = [:]
environments.each { e ->
deployments[e] = {
stage(e) {
podTemplate(yaml: """\
apiVersion: v1
kind: Pod
@hemebond
hemebond / p.yaml
Created March 18, 2021 14:25
Using Grains cache in pillars
{%- set grns = salt.saltutil.runner('cache.grains', tgt='serv*') %}
{%- for id, grn in grns.items()|sort %}
{%- set role = id[3:6] %}
address: {{ grn.ip4_interfaces.eth0[0] | default("127.0.0.1") }}
{%- endfor %}
@hemebond
hemebond / custom-yaml-constructor.py
Created August 29, 2020 12:34
A custom YAML contructor that does a deep merge of dicts
import yaml
from copy import copy, deepcopy
from yaml.nodes import MappingNode
from yaml.loader import Loader
from yaml.constructor import SafeConstructor
# Copyright Ferry Boender, released under the MIT license.
def deepupdate(tgt, src):
@hemebond
hemebond / LSP.sublime-settings
Created August 4, 2020 13:02
Sublime Text 3 LSP PyLS Project Settings
{
"clients": {
"pyls": {
"command": [
"~/.environments/pyls/bin/pyls"
],
"enabled": false,
"settings": {
"pyls": {
"plugins": {
@hemebond
hemebond / effectinfo.sublime-syntax
Last active March 7, 2020 05:52
DarkPlaces Quake custom particle effects
%YAML 1.2
---
# http://www.sublimetext.com/docs/3/syntax.html
name: effectinfo
file_extensions:
- txt
scope: source.effectinfo
variables:
@hemebond
hemebond / get_file_list.py
Last active December 25, 2019 09:54
Get file info for all files inside a zip or pak file
import os
import hashlib
from zipfile import ZipFile, BadZipFile
from datetime import datetime
from vgio.quake.pak import PakFile, BadPakFile # https://github.com/joshuaskelly/vgio/ <3
from typing import Union, BinaryIO
def get_digest(b):
"""Calculate the SHA256 hash of the bytes"""
@hemebond
hemebond / gravtest.map
Created November 30, 2019 06:42
My trigger_setgravity test map
// Game: Quake
// Format: Standard
// entity 0
{
"classname" "worldspawn"
"_tb_mod" "src;progs_dump"
"_tb_def" "external:/home/james/.darkplaces/hipnotic/maps/src/hipnotic.fgd"
"wad" "/home/james/.darkplaces/id1/maps/src/prototype.wad"
// brush 0
{
@hemebond
hemebond / ad_effectinfo.txt
Last active August 10, 2019 09:09
Arcane Dimensions particle effects with changes
//======================================================================
// PARTICLE DEF file
//
// MOD : AD v1.70 - (Arcane Dimensions)
// Date : 1st August 2017
// Author : Simon "Sock" OCallaghan
// Website: www.simonoc.com
//
//======================================================================
// SHOTGUN
@hemebond
hemebond / globals.sls
Created July 31, 2019 15:38
Sharing data in Pillars
#!jinja|yaml|gpg
{%- macro sjoin(items, sep=joiner(','), suffix='', prefix='') %}
{%- for item in items %}{{ sep() }}{{ prefix }}{{ item }}{{ suffix }}{% endfor %}
{%- endmacro %}
domain: my.example.com