This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let delay = ms => new Promise(r => setTimeout(r, ms)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var videos = document.querySelectorAll("video"); | |
if(videos.length<1){ alert("no video found!"); return; | |
} | |
var i=0; | |
var src = prompt("playIt? " + i + "/" + videos.length, videos[i].src); | |
if(src == null){ alert("no src found"); return; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on open theFileDropped | |
display alert "Are you sure you want to permanently delete " & the length of theFileDropped & " file(s)?" message "You cannot undo this action." as warning buttons {"Cancel", "OK"} default button 2 | |
if the button returned of the result is "OK" then | |
repeat with aFile in theFileDropped | |
do shell script "rm -Rf " & quoted form of POSIX path of aFile | |
end repeat | |
do shell script "afplay \"/System/Library/Components/CoreAudio.component/Contents/SharedSupport/SystemSounds/finder/empty trash.aif\"" | |
end if | |
end open |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Shader "Custom/VideoAlpha" { | |
Properties { | |
_MainTex ("Base (RGB)", 2D) = "white" {} | |
_AlphaOffsetX ("alpha offset x", float) = 0.5 | |
_AlphaOffsetY ("alpha offset y", float) = 0 | |
_Cutoff ("Cutoff", Range (0,1)) = .5 | |
} | |
SubShader { | |
AlphaTest Less [_Cutoff] | |
CGPROGRAM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function pc_validate($user,$pass) { | |
/* replace with appropriate username and password checking, | |
such as checking a database */ | |
$users = array('430' => ''); | |
if (isset($users[$user]) && ($users[$user] == $pass)) { | |
return true; | |
} else { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
:: app_restart.bat | |
:: %1 path of application | |
:loop | |
tasklist /fi "Status eq NOT RESPONDING" | findstr %~nx1 | |
if %errorlevel%==0 ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The "callback" argument is called with either true or false | |
// depending on whether the image at "url" exists or not. | |
function imageExists(url, callback) { | |
var img = new Image(); | |
img.onload = function() { callback(true); }; | |
img.onerror = function() { callback(false); }; | |
img.src = url; | |
} | |
// Sample usage |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
property ffplay : "/Applications/ffmpeg/ffplay" | |
on main(input) | |
do shell script ffplay & space & quoted form of input | |
end main | |
on open argv | |
repeat with aFile in argv | |
main(POSIX path of aFile) | |
end repeat |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
property ffplay : "/usr/local/bin/ffplay" | |
on main(input) | |
do shell script ffplay & space & quoted form of input | |
end main | |
on open argv | |
repeat with aFile in argv | |
main(POSIX path of aFile) | |
end repeat |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ffmpeg -i "%1" -vcodec copy -acodec pcm_s16le -ac 2 "%1.mov" |
NewerOlder