This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const std = @import("std"); | |
const Foo = struct { | |
const Self = @This(); | |
bar:std.ArrayList(u8) = undefined, | |
pub fn init(allocator: std.mem.Allocator) Foo { | |
var bar = std.ArrayList(u8).init(allocator); | |
return .{ .bar = bar }; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { execSync } = require('child_process'); | |
const fs = require('fs'); | |
const path = require('path'); | |
function execCommand(command) { | |
try { | |
execSync(command, { stdio: 'inherit' }); | |
} catch (err) { | |
console.error(`Error executing command: ${command}`); | |
process.exit(1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Blender's GLTF exporter does some splitting of blender verts based on loops i.e in my case a mesh with 386 verts ends up with | |
441 verts after gltf export. | |
As explained at https://blender.stackexchange.com/questions/167372/gltf-export-has-twice-the-vertices-it-should | |
glTF is a last mile format and stores mesh data in a "Ready to load on GPU" state. | |
This script basically predetermines how the export will split the vertices and produces all the vertex | |
indices that will exist in the final gltf data. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" plugins | |
let need_to_install_plugins = 0 | |
if empty(glob('~/.vim/autoload/plug.vim')) | |
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs | |
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim | |
let need_to_install_plugins = 1 | |
endif | |
call plug#begin() | |
Plug 'tpope/vim-sensible' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Find the api id | |
aws apigateway get-rest-apis | |
# Find the resource id | |
aws apigateway get-resources --rest-api-id <api_id> | |
# Rename the resource | |
aws apigateway update-resource --rest-api-id <api_id> --resource-id <res_id> --patch-operations op=replace,path=/pathPart,value=<new_name> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
script_watcher.py: Reload watched script upon changes. | |
Copyright (C) 2015 Isaac Weaver | |
Author: Isaac Weaver <wisaac407@gmail.com> | |
This program is free software; you can redistribute it and/or modify | |
it under the terms of the GNU General Public License as published by | |
the Free Software Foundation; either version 2 of the License, or | |
(at your option) any later version. |