Skip to content

Instantly share code, notes, and snippets.

View mxvsh's full-sized avatar
🎯
Focusing

Monawwar Abdullah mxvsh

🎯
Focusing
View GitHub Profile
@mxvsh
mxvsh / MainActivity.kt
Created August 15, 2025 05:28
Android TV WebRTC Demo
package com.sideorg.jamm
import android.annotation.SuppressLint
import android.os.Bundle
import android.util.Log
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.activity.viewModels
import android.view.KeyEvent
import androidx.compose.foundation.background
@mxvsh
mxvsh / ContentView.swift
Last active August 14, 2025 20:27
macOS WebRTC Screen Stream
import SwiftUI
import Cocoa
import AVFoundation
import CoreGraphics
import CoreVideo
import Swifter
import WebRTC
import ScreenCaptureKit
// MARK: - App Delegate for Clean Shutdown
@mxvsh
mxvsh / ContentView.swift
Last active August 14, 2025 19:31
macos-basic-hls
import SwiftUI
import AVFoundation
import Swifter
// MARK: - HLS Segmenter (fMP4 HLS via AVAssetWriter)
final class HLSSegmenter: NSObject, AVAssetWriterDelegate {
struct Segment {
let sequence: Int
let data: Data
}
@mxvsh
mxvsh / install.sh
Created January 18, 2025 11:25
dex installation script
#!/bin/bash
set -e
REPO="mxvsh/dex"
LATEST=$(curl -s https://api.github.com/repos/$REPO/releases/latest | grep "tag_name" | cut -d '"' -f 4)
OS=$(uname -s | tr '[:upper:]' '[:lower:]')
ARCH=$(uname -m)
if [[ $OS == "darwin" ]]; then
@mxvsh
mxvsh / chakra-ui-simple-chat-ui.tsx
Created March 14, 2023 05:08
Simple Chakra-UI Chat Application User Interface
import {
Button,
Flex,
Heading,
HStack,
Input,
Stack,
Text,
} from '@chakra-ui/react';
@mxvsh
mxvsh / rename-js-to-ts.sh
Created September 25, 2022 14:30
Renaming JS to TS
find src -name "*.js" -exec sh -c 'mv "$0" "${0%.js}.ts"' {} ;
@mxvsh
mxvsh / caption.srt
Last active September 24, 2022 09:04
1
00:00:15.000 --> 00:00:17,951
At the left we can see...
2
00:00:18.166 --> 00:00:20.083
At the right we can see the...
3
00:00:20.119 --> 00:00:21.962
@mxvsh
mxvsh / gist:aaff036c47e302e0200e6977f10bf8f6
Created September 21, 2021 01:54 — forked from guilherme/gist:9604324
Git pre-commit hook that detects if the developer forget to remove all the javascript console.log before commit.
#!/bin/sh
# Redirect output to stderr.
exec 1>&2
# enable user input
exec < /dev/tty
consoleregexp='console.log'
# CHECK
if test $(git diff --cached | grep $consoleregexp | wc -l) != 0
then
@mxvsh
mxvsh / keybase.md
Last active January 10, 2021 13:22

Keybase proof

I hereby claim:

  • I am xencodes on github.
  • I am xencodes (https://keybase.io/xencodes) on keybase.
  • I have a public key ASAqTG3p3yePe-vAgVR0JU6AZaBVeTSMdD4ybeJuASPokgo

To claim this, I am signing this object: