Skip to content

Instantly share code, notes, and snippets.

View dynamite-bud's full-sized avatar
🎯
Focusing

Rudra dynamite-bud

🎯
Focusing
  • Trinity College Dublin
  • Dublin, Ireland
  • 21:28 (UTC)
View GitHub Profile
@dynamite-bud
dynamite-bud / Django-on-wasmer.md
Created November 7, 2023 13:31
Running Django on Wasmer.
@dynamite-bud
dynamite-bud / Project.md
Last active October 2, 2023 18:18
SIP and VoIP DDOS simulation
export interface RadarData {
id: number;
rcs: number;
dist_lat: number;
dist_long: number;
dyn_prop: number;
vrel_lat: number;
vrel_long: number;
}
@dynamite-bud
dynamite-bud / mapbox-3d.tsx
Created May 17, 2022 10:23 — forked from sknightq/mapbox-3d.tsx
Mapbox custom layer which renders multiple models in a THREE.js scene
import * as THREE from 'three'
import { GLTF, GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader'
import { setPosition } from '@/components/Mapbox/utils'
import MapboxGL, { LngLatLike, MercatorCoordinate } from 'mapbox-gl'
import { LayerConfig, ModelTransform } from './types'
import { FeatureCollection } from 'geojson'
import { Object3D } from 'three'
function transform(layerConfig: LayerConfig, modelConfig: { position: LngLatLike; altitude: number }, center: mapboxgl.MercatorCoordinate): THREE.Matrix4 {
const { modelScale, modelRotate } = layerConfig
@dynamite-bud
dynamite-bud / sprite-custom-layer.tsx
Created May 12, 2022 12:09 — forked from danvk/sprite-custom-layer.tsx
Mapbox custom layer which renders multiple models in a THREE.js scene
import MapboxGL, {LngLatLike, MercatorCoordinate} from 'mapbox-gl';
import React, {useEffect, useState} from 'react';
import {withMap} from 'react-mapbox-gl/lib-esm/context';
import {FeatureCollection} from 'geojson';
import * as THREE from 'three';
import {GLTFLoader} from 'three/examples/jsm/loaders/GLTFLoader';
export interface SpritePaint {
gltfPath: string;
@dynamite-bud
dynamite-bud / stream_example.md
Created January 28, 2022 06:28 — forked from reinzor/stream_example.md
GStreamer UDP stream examples

MJPEG

Server (Ubuntu 16.04)

gst-launch-1.0 -v filesrc location= /home/rein/Videos/big_buck_bunny_720p_30mb_0_0.mp4 ! decodebin ! videoconvert ! jpegenc ! rtpjpegpay ! udpsink host=localhost port=5000

Client (Ubuntu 16.04)

@dynamite-bud
dynamite-bud / useAsyncWithUnsafeDispatch.js
Created June 23, 2021 18:59
When i use useAsync with unsafeDispatch.js
function useAsync(initialState) {
const [state, unsafeDispatch] = React.useReducer(asyncReducer, {
status: 'idle',
data: null,
error: null,
...initialState,
})
const dispatch = React.useCallback((...args) => {
unsafeDispatch(...args)
}, [])
@dynamite-bud
dynamite-bud / useAsync.js
Created June 23, 2021 18:57
When i have useAsync without dispatch function
function useAsync(initialState) {
const [state, dispatch] = React.useReducer(asyncReducer, {
status: 'idle',
data: null,
error: null,
...initialState,
})
const run = React.useCallback(
promise => {
import React from "react";
import PropTypes from "prop-types";
import clsx from "clsx";
import { lighten, makeStyles } from "@material-ui/core/styles";
import Table from "@material-ui/core/Table";
import TableBody from "@material-ui/core/TableBody";
import TableCell from "@material-ui/core/TableCell";
import TableContainer from "@material-ui/core/TableContainer";
import TableHead from "@material-ui/core/TableHead";
import TablePagination from "@material-ui/core/TablePagination";
//
// Created by Rudra on 04-Feb-21.
//
//
// Created by Rudra on 25-Jan-21.
//
#include<iostream>
#include<sstream>
#include<iterator>