Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View thekingofbandit's full-sized avatar
🏠
Working from home

Mohammad Khanafi thekingofbandit

🏠
Working from home
View GitHub Profile
import { useState, useEffect } from 'react';
// Usage
function App() {
// Call our hook for each key that we'd like to monitor
const happyPress = useKeyPress('h');
const sadPress = useKeyPress('s');
const robotPress = useKeyPress('r');
const foxPress = useKeyPress('f');
@thekingofbandit
thekingofbandit / docker-compose.yml
Created July 27, 2021 08:20 — forked from crazyoptimist/compose.yaml
MongoDB Docker Deployment
version: "3.1"
services:
mongodb:
container_name: mongo
image: mongo
volumes:
- ./db_data/:/data/db/
ports:
- 27017:27017
restart: always
#EXTM3U
#EXTINF:-1,BBC - Radio 1
http://open.live.bbc.co.uk/mediaselector/5/select/version/2.0/mediaset/http-icy-mp3-a/vpid/bbc_radio_one/format/pls.pls
#EXTINF:-1,BBC - Radio 2
http://open.live.bbc.co.uk/mediaselector/5/select/version/2.0/mediaset/http-icy-mp3-a/vpid/bbc_radio_two/format/pls.pls
#EXTINF:-1,BBC - Radio 3
http://open.live.bbc.co.uk/mediaselector/5/select/version/2.0/mediaset/http-icy-mp3-a/vpid/bbc_radio_three/format/pls.pls
#EXTINF:-1,BBC - Radio 4
http://open.live.bbc.co.uk/mediaselector/5/select/version/2.0/mediaset/http-icy-mp3-a/vpid/bbc_radio_fourfm/format/pls.pls
#EXTINF:-1,BBC - Radio 4 LW
@thekingofbandit
thekingofbandit / inlinesvgzoom.jsx
Created August 24, 2021 00:34
inline svg jsx
import React from "react";
import { ReactSVGPanZoom } from "react-svg-pan-zoom";
import { makeStyles } from "@material-ui/core/styles";
import Grid from "@material-ui/core/Grid";
import Diagram from "../components/Diagram";
const svgPanZoom = require("svg-pan-zoom");
const useStyles = makeStyles((theme) => ({
root: {
flexGrow: 1
@thekingofbandit
thekingofbandit / m3u8-to-mp4.md
Created December 17, 2021 02:34 — forked from tzmartin/m3u8-to-mp4.md
m3u8 stream to mp4 using ffmpeg

1. Copy m3u8 link

Alt text

2. Run command

echo "Enter m3u8 link:";read link;echo "Enter output filename:";read filename;ffmpeg -i "$link" -bsf:a aac_adtstoasc -vcodec copy -c copy -crf 50 $filename.mp4
@thekingofbandit
thekingofbandit / 000-Cheat-Sheets.md
Created January 28, 2023 18:12 — forked from JoshuaEstes/000-Cheat-Sheets.md
Developer Cheat Sheets for bash, git, gpg, irssi, mutt, tmux, and vim. See my dotfiles repository for extra info.