Skip to content

Instantly share code, notes, and snippets.

View CrashedBboy's full-sized avatar
😃

CrashedBboy CrashedBboy

😃
View GitHub Profile
@CrashedBboy
CrashedBboy / main.py
Last active October 26, 2023 13:58
FFMPEG Compression Commands
import json, sys, os, subprocess
def isNumber(i):
if type(i) == int or type(i) == float:
return True
else:
return False
def isVideo(filename):
chunks = filename.split(".")
@CrashedBboy
CrashedBboy / main.py
Last active November 7, 2023 17:32
JPEG Compression
import json, sys, os
from PIL import Image
def isNumber(i):
if type(i) == int or type(i) == float:
return True
else:
return False
def isJPEG(filename):
@CrashedBboy
CrashedBboy / merge.py
Created October 15, 2023 12:00
Merge Video Clips
from moviepy.editor import VideoFileClip, concatenate_videoclips
clip1 = VideoFileClip("1.mp4")
clip2 = VideoFileClip("2.mp4")
clip3 = VideoFileClip("3.mp4")
clip4 = VideoFileClip("4.mp4")
clip5 = VideoFileClip("5.mp4")
clip6 = VideoFileClip("6.mp4")
final_clip = concatenate_videoclips([clip1,clip2, clip3, clip4, clip5, clip6])
@CrashedBboy
CrashedBboy / ChromeSerial.js
Last active April 19, 2019 00:48
Sample of serial device API for Chrome applications.
// class
function Serial(path, birate, dataBit, stopBit, parityBit, stageManager) {
this.path = path;
this.birate = birate;
this.dataBit = dataBit;
this.stopBit = stopBit;
this.parityBit = parityBit;
this.stageManager = stageManager;
this.connectionId = null;
this.buffer = "";
@CrashedBboy
CrashedBboy / learn-async-await.js
Last active January 19, 2019 01:41
Learning await/async in Javascript
async function start () {
try {
let result1 = await callAwaitFunction(2);
console.log(result1);
let result2 = await callAwaitFunction(-1);
console.log(result2);
// these 2 lines won't be reached because of the exception
let result3 = await callAwaitFunction(2);