Skip to content

Instantly share code, notes, and snippets.

View samueleastdev's full-sized avatar

Samuel East samueleastdev

View GitHub Profile
@samueleastdev
samueleastdev / PasteInGitBash.ahk
Last active October 5, 2022 09:43 — forked from 2ajoyce/PasteInGitBash.ahk
Autohotkey Copy & Paste For Git Bash
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
SetTitleMatchMode, 1
I_Icon = C:\Program Files\AutoHotkey\Letter Icons\paste.ico
ICON [I_Icon] ;Changes a compiled script's icon (.exe)
if I_Icon <>
IfExist, %I_Icon%
@samueleastdev
samueleastdev / DRMFairplay.swift
Created August 31, 2021 18:11 — forked from neha-bansal790/DRMFairplay.swift
DRM fairplay with hls integration
//
// DRMFairplay.swift
// Collection
//
// Created by B0203948 on 04/02/20.
// Copyright © 2020 wynk. All rights reserved.
//
import UIKit
import AVFoundation
Originall From: Posted 2015-05-29 http://ubwg.net/b/full-list-of-ffmpeg-flags-and-options
This is the complete list that’s outputted by ffmpeg when running ffmpeg -h full.
usage: ffmpeg [options] [[infile options] -i infile]… {[outfile options] outfile}…
Getting help:
-h — print basic options
-h long — print more options
-h full — print all options (including all format and codec specific options, very long)
// Takes an ArrayBuffer; returns an array of these objects:
// {
// seconds: *number of seconds into the video of this image*,
// bytes: *the bytes of this image, as an ArrayBuffer*
// }
var parseBif = function(buffer) {
var data = new Uint8Array(buffer);
// Make sure this really is a BIF.
var magicNumber = [0x89, 0x42, 0x49, 0x46, 0x0d, 0x0a, 0x1a, 0x0a];
@samueleastdev
samueleastdev / create-vod-hls.sh
Created June 10, 2020 16:04 — forked from maitrungduc1410/create-vod-hls.sh
Bash scripts to create VOD HLS stream with ffmpeg (Extended version)
#!/usr/bin/env bash
set -e
# Usage create-vod-hls.sh SOURCE_FILE [OUTPUT_NAME]
[[ ! "${1}" ]] && echo "Usage: create-vod-hls.sh SOURCE_FILE [OUTPUT_NAME]" && exit 1
# ----CUSTOM----
sourceResolution="$(ffprobe -v error -select_streams v:0 -show_entries stream=width,height -of csv=s=x:p=0 ${1})"
# echo ${sourceResolution}
@samueleastdev
samueleastdev / extractvideo.js
Created July 18, 2019 14:30 — forked from atwong/extractvideo.js
Extract Multiple Screenshots Video
/*
* Extract multiple screenshots/frames from a video URL
* Params
* - vidURL : video URL
* - frOffsets : array of timestamps
* - frameWidth : screenshot width (default: video width)
* Returns
* - frames: object with offset => {imgUrl, blob}
*
* An multiple-frame extension of http://cwestblog.com/2017/05/03/javascript-snippet-get-video-frame-as-an-image/
# remove specific file from git cache
git rm --cached filename
# remove all files from git cache
git rm -r --cached .
git add .
git commit -m ".gitignore is now working"
@samueleastdev
samueleastdev / umd-script-boilerplate.js
Created March 11, 2017 04:19 — forked from cferdinandi/umd-script-boilerplate.js
A simple boilerplate for UMD JS modules.
(function (root, factory) {
if ( typeof define === 'function' && define.amd ) {
define([], factory(root));
} else if ( typeof exports === 'object' ) {
module.exports = factory(root);
} else {
root.myPlugin = factory(root);
}
})(typeof global !== "undefined" ? global : this.window || this.global, function (root) {
@samueleastdev
samueleastdev / RecordingVideo.js
Created August 31, 2012 08:50 — forked from ericdagenais/RecordingVideo.js
How to record video, then share or save it. Using Appcelerator Titanium!
/**
* This sample lets you record and share video with Appcelerator Titanium on Android.
* REQUIRES THE 1.6.0 RC OF TITANIUM MOBILE SDK
* http://developer.appcelerator.com/blog/2011/02/release-candidate-for-titanium-mobile-1-6-0.html
*/
/**
* First, create our UI. We'll have two buttons: record, and share.
*/
var win = Titanium.UI.createWindow({