Skip to content

Instantly share code, notes, and snippets.

View strideynet's full-sized avatar
⛷️
Wishin I was skiin'

Noah Stride strideynet

⛷️
Wishin I was skiin'
View GitHub Profile
// AddReportSheet copies the current sheet to a new sheet
function AddReportSheet() {
// Ask the user to specify the N Number for the new report.
var referenceNumber = SpreadsheetApp.getUi()
.prompt("Please enter the N Number.")
.getResponseText();
// Duplicate the template sheet.
var newSheet = SpreadsheetApp.getActiveSpreadsheet().duplicateActiveSheet();
goroutine profile: total 1564
1538 @ 0x448496 0x45875e 0xa406d3 0x47c5c1
# 0xa406d2 google.golang.org/grpc.(*ccBalancerWrapper).watcher+0x72 google.golang.org/grpc@v1.55.0/balancer_conn_wrappers.go:115
1 @ 0x418fd4 0x47896f 0x2002619 0x47c5c1
# 0x47896e os/signal.signal_recv+0x2e runtime/sigqueue.go:152
# 0x2002618 os/signal.loop+0x18 os/signal/signal_unix.go:23
1 @ 0x43d256 0x4762e5 0x1ef0ed5 0x1ef0ced 0x1eeda6b 0x20ffcc5 0x2100813 0x714e2f 0x7167c9 0x717f76 0x713952 0x47c5c1
# 0x4762e4 runtime/pprof.runtime_goroutineProfileWithLabels+0x24 runtime/mprof.go:844
@strideynet
strideynet / dump_tpm_ekcerts.go
Created May 2, 2023 11:02
Basic Go script to use `go-attestation` to dump the TPM EKCerts to disk w/ PEM encoding.
package main
import (
"encoding/pem"
"fmt"
"github.com/google/go-attestation/attest"
"log"
"os"
)
package main
import (
"bufio"
"fmt"
"io"
"log"
"os"
"strconv"
"strings"
@strideynet
strideynet / badge.py
Created June 24, 2022 19:25
Badge first edition
import badger2040
import qrcode
import json
import os
badger2040.system_speed(0) # lets save some battery
display = badger2040.Badger2040()
display.update_speed(2)
package main
import (
"context"
"sync"
)
type BroadcastManager struct {
sync.Mutex
apiVersion: rbac.authorization.k8s.io/v1
# This cluster role binding allows anyone in the "manager" group to read secrets in any namespace.
kind: ClusterRoleBinding
metadata:
name: ClusterAdminCudoDev
subjects:
- kind: Group
name: oidcdev@cudoventures.com
apiGroup: rbac.authorization.k8s.io
roleRef:
apiVersion: v1
kind: Service
metadata:
name: my-nginx
labels:
run: my-nginx
spec:
type: NodePort
ports:
- port: 8080
Blender 2.80 (sub 75) (hash f6cb5f54494e built 2019-07-29 17:17:04)
found bundled python: /app/blender/2.80/python
Running device load
([<bpy_struct, CyclesDeviceSettings("Intel Pentium CPU G4400 @ 3.30GHz")>], [<bpy_struct, CyclesDeviceSettings("Radeon RX 580 Series")>, <bpy_struct, CyclesDeviceSettings("Intel Pentium CPU G4400 @ 3.30GHz")>])
Radeon RX 580 Series True
Intel Pentium CPU G4400 @ 3.30GHz False
Read blend: /app/blender-input/scene.blend
Fra:1 Mem:68.61M (0.00M, Peak 69.35M) | Time:00:00.50 | Mem:0.00M, Peak:0.00M | Scene, RenderLayer | Synchronizing object | Light
Fra:1 Mem:68.61M (0.00M, Peak 69.35M) | Time:00:00.50 | Mem:0.00M, Peak:0.00M | Scene, RenderLayer | Synchronizing object | Floor
Fra:1 Mem:68.61M (0.00M, Peak 69.35M) | Time:00:00.50 | Mem:0.00M, Peak:0.00M | Scene, RenderLayer | Synchronizing object | carShell
#include <locale.h>
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
#include <wchar.h>
// get random number from 0 up to `max` [0 - `(max - 1)` inclusive]
int getRandom(int max);
// fill the array with emotes yay