Skip to content

Instantly share code, notes, and snippets.

View 0x77dev's full-sized avatar
:shipit:

Mykhailo Marynenko 0x77dev

:shipit:
View GitHub Profile
@0x77dev
0x77dev / split-csv.ts
Created April 4, 2024 21:40
Split a CSV file in Bun.js into 100MB chunks while preserving header and row integrity with memory efficiency and streaming.
#!/usr/bin/env bun
import { createReadStream, createWriteStream, stat } from 'fs'
import { basename } from 'path'
import { Transform } from 'stream'
import { promisify } from 'util'
const MAX_SIZE = 100 * 1024 * 1024 // 100MB
const splitFile = async (filePath: string): Promise<void> => {
@0x77dev
0x77dev / Apple Silicon GPU Data
Last active October 30, 2022 20:56
Information about Apple Silicon GPUs on different M1 laptops
https://twitter.com/linaasahi/status/1586575362225369088
@asahilina tweeted:
```
Hi everyone! I'm looking at per-device GPU data, and I want to collect examples!
Can you help out by running this command from macOS? ✨
ioreg -l|egrep 'gpu-core-count|AGXParameterBufferMax|GPUConfiguration|shared-region-base|class IOPlatformExpertDevice|perf-states|OS Build'
```
@0x77dev
0x77dev / gopro_max.py
Created August 5, 2022 13:07
GoPro Max get wifi credentials using BLE via python bleak
import asyncio
from bleak import BleakScanner, BleakClient
async def main():
devices = await BleakScanner.discover(service_uuids=["FEA6"])
print(devices)
device = devices[0]
if not device:
print("No device found")
exit(-1)

Keybase proof

I hereby claim:

  • I am 0x77dev on github.
  • I am 0x77dev (https://keybase.io/0x77dev) on keybase.
  • I have a public key ASDnqlWvh5k7ZndeklBJ0uYqyOL3BfU0fVPwB9dThcyTsAo

To claim this, I am signing this object:

@0x77dev
0x77dev / mercurius-issue-424.ts
Last active July 25, 2021 12:54
mercurius-js/mercurius #424
import Fastify from "fastify";
import mercurius, { IResolvers, MercuriusContext } from "mercurius"
const example = Fastify()
const schema = `
extend type Query {
test: Boolean!
}
type TestEvent{
@0x77dev
0x77dev / README.md
Last active April 5, 2022 19:23
mercurius-js/mercurius #370
@0x77dev
0x77dev / README.md
Last active May 18, 2021 11:01
Install SSH keys from GitHub

Install SSH keys from GitHub

This script installs your public ssh keys from GitHub to your ~/.ssh/authorized_keys.

Example

$ curl -L https://git.io/JTZHT | bash -s 0x77dev

Usage

@0x77dev
0x77dev / cloudSettings
Last active September 3, 2020 22:01
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-09-03T22:01:49.199Z","extensionVersion":"v3.4.3"}
@0x77dev
0x77dev / cloudSettings
Last active February 10, 2020 12:44
VSCODE CONFIG
{"lastUpload":"2020-02-10T12:44:35.421Z","extensionVersion":"v3.4.3"}

Keybase proof

I hereby claim:

  • I am 0x77dev on github.
  • I am 0x77dev (https://keybase.io/0x77dev) on keybase.
  • I have a public key ASDmXFOPpPxMxpDwq5E7js6vDsZ3WEhy2BaNs2QnmiCAUQo

To claim this, I am signing this object: