Skip to content

Instantly share code, notes, and snippets.

Avatar
🦀
Programming something in Rust, probably

Matthew J. Berger matthewjberger

🦀
Programming something in Rust, probably
View GitHub Profile
View main.rs
#[repr(u8)]
pub enum Opcode {
Null,
First,
}
fn main() {
println!("0b{:08b}", Opcode::First as u8);
}
@matthewjberger
matthewjberger / dump-github-context.md
Created Jul 28, 2022
Dump github context in a github action
View dump-github-context.md

To dump github context in a github action:

   - name: Dump Github context
        env:
          GITHUB_CONTEXT: ${{ toJSON(github) }}
        run: echo "$GITHUB_CONTEXT"
@matthewjberger
matthewjberger / convert.ts
Created Jul 26, 2022
convert a timestream query result to a mui-x datagrid compatible format
View convert.ts
private normalizeQueryOutput = (output: QueryCommandOutput) => {
const columns =
output.ColumnInfo?.map((column) => {
const name = column.Name ?? "Unknown"
return {
field: name,
headerName: name,
flex: 1,
}
}) ?? []
@matthewjberger
matthewjberger / steam-deck.md
Created Jul 24, 2022
setup the steam deck for desktop usage
View steam-deck.md
  • use passwd to create a password for the deck user
  • disable read-only mode with: sudo steamos-readonly disable
  • Initialize the pacman keyring: sudo pacman-key --init
  • Populate the pacman keyring with the default Arch Linux keys: sudo pacman-key --populate archlinux
  • Try installing a package: sudo pacman -S vim
@matthewjberger
matthewjberger / main.py
Created Jul 21, 2022
Example of synchronization being used for escpos printing
View main.py
from escpos import *
from PIL import Image
from io import BytesIO
import base64
import threading
class Printer:
_lock = threading.Lock()
View answers.md

Hyphen SDET Candidate Interview Questions

Welcome! I know we've met before but remembering names can be difficult when meeting so many new people, so again my name is Matthew Berger and I am Senior Software Engineer at Hyphen. It's good to see you again.

Today we'll go over a few questions about code comprehension and testing over the course of about 30 minutes. If you're ready to start, let's dive in!

Question 1

View questions.md

Hyphen SDET Candidate Interview Questions

Welcome!

The questions below are about code comprehension and testing, and will be the only non-behavioral phase of the interview process.

Good luck! 😄

@matthewjberger
matthewjberger / ip.ps1
Created Jun 29, 2022
Get a computer's external IP using powershell
View ip.ps1
(Invoke-WebRequest -UseBasicParsing ifconfig.me/ip).Content.Trim()
View scoop-admin.ps1
iex "& {$(irm get.scoop.sh)} -RunAsAdmin
View items.tsx
import DeleteForeverIcon from "@mui/icons-material/DeleteForever"
import HomeIcon from "@mui/icons-material/Home"
import PauseIcon from "@mui/icons-material/Pause"
import PlayArrowIcon from "@mui/icons-material/PlayArrow"
import RefreshIcon from "@mui/icons-material/Refresh"
import StopIcon from "@mui/icons-material/Stop"
import { ReactNode } from "react"
import { ZoneControlState } from "../../db/makeline-health"
interface Item {