Skip to content

Instantly share code, notes, and snippets.

View bobbyg603's full-sized avatar
🚀
building dreams

Bobby Galli bobbyg603

🚀
building dreams
View GitHub Profile
@bobbyg603
bobbyg603 / index.pug
Created January 3, 2021 22:46
Pure CSS Light Bulb
.wrapper
span(class='indicator minus') -
- for(var i = 1; i <= 100; i++)
- i++
label(
class="label-rank-"+i
for="radio-"+i
)
if i == 50
input(
@bobbyg603
bobbyg603 / gn.bat
Created January 13, 2021 14:45
Crashpad
gn gen out\Debug --args="extra_cflags=\"/MTd\" target_cpu=\"x86\""
gn gen out\Debug_x64 --args="extra_cflags=\"/MTd\""
gn gen out\Release --args="extra_cflags=\"/MT\" target_cpu=\"x86\""
gn gen out\Release_x64 --args="extra_cflags=\"/MT\""
@bobbyg603
bobbyg603 / load-source-maps.ts
Created April 21, 2021 17:33
Load TypeScript source maps at runtime
// @bobbyg603
// 04-21-2021
// bugsplat.com
import { StackConverter } from '@bugsplat/stack-converter';
(async () => {
try {
crash();
} catch(error) {
console.log(error.stack)
@bobbyg603
bobbyg603 / unity-in-memory-png.cs
Created April 25, 2021 21:56
In memory screenshot in Unity
private byte[] CaptureInMemoryPngScreenshot()
{
// TODO BG the example calls Destory on texture, do we need to do that?
var texture = new Texture2D(Screen.width, Screen.height, TextureFormat.RGB24, false);
texture.ReadPixels(new Rect(0, 0, Screen.width, Screen.height), 0, 0);
texture.Apply();
return texture.EncodeToPNG();
}
@bobbyg603
bobbyg603 / .commitlintrc.js
Created February 17, 2022 22:56
Commitlint configuration file with a few extra rules to make generating release notes easier
module.exports = {
extends: [
'@commitlint/config-conventional'
],
rules: {
'body-max-line-length': [0, 'always'],
'footer-max-line-length': [0, 'always']
}
};
@bobbyg603
bobbyg603 / ci.yml
Last active February 22, 2022 19:57
CI Test Step for Node.js Applications
# Based on https://github.com/actions/starter-workflows/blob/main/ci/node.js.yml
name: CI
on:
pull_request:
branches:
- main
jobs:
ci:
runs-on: ubuntu-latest
steps:
@bobbyg603
bobbyg603 / ng-ci.yml
Last active February 22, 2022 19:57
GitHub Actions Continuous Integration Workflow for Angular
# Based on https://github.com/actions/starter-workflows/blob/main/ci/node.js.yml
name: CI
on:
pull_request:
branches:
- main
jobs:
ci:
runs-on: ubuntu-latest
steps:
@bobbyg603
bobbyg603 / ng-cd.yml
Last active February 22, 2022 19:58
GitHub Actions Continuous Integration Workflow for Angular Apps and Libraries
# Based on https://github.com/actions/starter-workflows/blob/main/ci/node.js.yml
name: CD
on:
push:
branches:
- main
jobs:
cd:
concurrency: ci-${{ github.ref }}
runs-on: ubuntu-latest
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
//
// This sample project illustrates how to capture crashes (unhandled exceptions) in native Windows applications using BugSplat.
//
// The shared sample database 'Fred' is used in this example.
// You may view crashes for the Fred account by logging in at https://www.bugsplat.com:
// Account (Email Address): Fred@bugsplat.com
// Password: ***
//
// In order to assure that crashes sent to the BugSplat website yield exception stack traces with file/line # information,
// just rebuild this project. A Visual Studio post build event is configured to send the resulting .exe and .pdb files