Skip to content

Instantly share code, notes, and snippets.

View larenelg's full-sized avatar
💖

Larene larenelg

💖
View GitHub Profile
@cmatskas
cmatskas / detached-head-merge.ps1
Created August 22, 2015 21:55
Git merge detached head
$git checkout –b temp #makes a new branch from current detached HEAD
$git branch –f master temp #update master to point to the new <temp> branch
$git branch –d temp #delete the <temp> branch
$git push origin master #push the re-established history
@KodrAus
KodrAus / Profile Rust on Linux.md
Last active November 14, 2023 17:19
Profiling Rust Applications

Profiling performance

Using perf:

$ perf record -g binary
$ perf script | stackcollapse-perf.pl | rust-unmangle | flamegraph.pl > flame.svg

NOTE: See @GabrielMajeri's comments below about the -g option.

@larenelg
larenelg / forward-cloudwatch-logs-to-seq.js
Last active May 25, 2022 06:53
Forward Cloudwatch Logs to Seq Lambda
'use strict';
/*
Make sure you are logging to Console using the Compact JSON Formatter, e.g.
```
public class LambdaEntryPoint : APIGatewayHttpApiV2ProxyFunction
{
protected override void Init(IWebHostBuilder builder)
{