Skip to content

Instantly share code, notes, and snippets.

Zane Claes zaneclaes

Block or report user

Report or block zaneclaes

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@zaneclaes
zaneclaes / certbot_jks.sh
Created Apr 23, 2019
Converts a letsencrypt certificate into a JKS file.
View certbot_jks.sh
#!/bin/bash
# Converts a letsencrypt certificate into a JKS file.
# Usage:
# ./certbot_jks.sh [domain_name] [email]
le_dir="/etc/letsencrypt"
domain=${1}
email=${2}
OUT_DIR=${le_dir}/live/${domain}
GATE_EXPORT_PASSWORD=test1234
View .zshrc
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="$HOME/.oh-my-zsh"
ZSH_THEME="powerlevel9k/powerlevel9k"
ZSH_DISABLE_COMPFIX=false
POWERLEVEL9K_MODE='nerdfont-complete'
View phone_tablet_as_external_screen.sh
#!/bin/bash
#
# ARG_HELP([Configure a mobile device as an external screen:])
# ARG_POSITIONAL_SINGLE([width],[Width of the external screen])
# ARG_POSITIONAL_SINGLE([height],[Height of the external screen])
# ARG_POSITIONAL_SINGLE([position],[Position of the external screen: top, right, bottom, or left],[position - right])
# ARGBASH_GO()
# needed because of Argbash --> m4_ignore([
### START OF CODE GENERATED BY Argbash v2.6.1 one line above ###
# Argbash is a bash code generator used to get arguments parsing right.
View GRPC Cross Make
[CLEAN] Cleaning build directories.
[MAKE] Generating /work/libs/opt/pkgconfig/grpc.pc
[MAKE] Generating /work/libs/opt/pkgconfig/grpc_unsecure.pc
[MAKE] Generating cache.mk
[CXX] Compiling src/core/lib/gpr/alloc.cc
[CXX] Compiling src/core/lib/gpr/arena.cc
[CXX] Compiling src/core/lib/gpr/atm.cc
[CXX] Compiling src/core/lib/gpr/avl.cc
[CXX] Compiling src/core/lib/gpr/cmdline.cc
[CXX] Compiling src/core/lib/gpr/cpu_iphone.cc
View function.rb
# MIT License
#
# Copyright (c) 2018, Zane Claes
#
# 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
# furnished to do so, subject to the following conditions:
View graphql.rb
# MIT License
#
# Copyright (c) 2018, Zane Claes
#
# 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
# furnished to do so, subject to the following conditions:
View proxy.rb
# MIT License
#
# Copyright (c) 2018, Zane Claes
#
# 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
# furnished to do so, subject to the following conditions:
View CreatureRenderer.cs
// I created a shared base-class for both CreatureRenderer and CreatureCanvasRenderer, which removes tons and tons of copy/pasted code...
// Here's how I transform the vertices...
public void UpdateRenderingData() {
CreatureRenderModule.UpdateRenderingData(
creature_manager,
counter_clockwise,
ref vertices,
ref normals,
ref tangents,
@zaneclaes
zaneclaes / UVBoxes.cs
Last active Nov 6, 2017
UV Boxes for creature
View UVBoxes.cs
MeshRenderBoneComposition comp =
creatureAsset.creature_manager.target_creature.render_composition;
List<MeshRenderRegion> regions = comp.getRegions();
foreach (MeshRenderRegion region in regions) {
Rect r = new Rect();
int uvIndex = region.getUVsIndex();
for (int i = 0; i < region.getNumPts(); i++) {
Vector2 p = new Vector2(region.store_uvs[uvIndex], region.store_uvs[uvIndex + 1]);
if (i == 0) {
r.xMax = r.xMin = (float)p.x;
View UV boxes for Creature
MeshRenderBoneComposition comp =
creatureAsset.creature_manager.target_creature.render_composition;
List<MeshRenderRegion> regions = comp.getRegions();
foreach (MeshRenderRegion region in regions) {
Rect r = new Rect();
int uvIndex = region.getUVsIndex();
for (int i = 0; i < region.getNumPts(); i++) {
Vector2 p = new Vector2(region.store_uvs[uvIndex], region.store_uvs[uvIndex + 1]);
if (i == 0) {
r.xMax = r.xMin = (float)p.x;
You can’t perform that action at this time.