https://github.com/H3rz3n/Davinci-Resolve-Fedora-38-39-40-Fix
This file contains 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
/** | |
* Is this a local IP? | |
* @param {string} $ip The IP address you wish to checkk. | |
* @return {boolean} Whether the IP is visiting from a local network. | |
*/ | |
function isLocalIp($ip){ | |
// Some local IP ranges. | |
$ranges = Array( | |
Array('10.0.0.0','10.255.255.255'), | |
Array('172.16.0.0','172.31.255.255'), |
This file contains 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
#!/bin/bash | |
# Generate a manifest file. Outputs to STDOUT. | |
# Usage: ./manifestgen.sh somefolder/ | |
function scandir { | |
cd $1; | |
RELATIVEDIR=`pwd`; | |
if [ $BASEDIR == $RELATIVEDIR ] | |
then | |
RELATIVEDIR="" | |
else |
This file contains 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
function getContentType(url,callback){ | |
var oReq = new XMLHttpRequest(); | |
oReq.onreadystatechange = function(){ | |
if(this.readyState == this.DONE){ | |
callback(this.getResponseHeader("content-type")); | |
} | |
}; | |
oReq.open("head", url, true); | |
oReq.send(); | |
} |
This file contains 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
function rgbStrToHex(str){ | |
function rgbToHex(r,g,b){ | |
var bin = r << 16 | g << 8 | b; | |
return '#'+(function(h){ | |
return new Array(7-h.length).join("0")+h | |
})(bin.toString(16).toUpperCase()) | |
} | |
if(!str){ | |
return; |
This file contains 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
/** | |
* Check whether an element is visible | |
* @param {jQuery} elm jQuery element | |
* @return {Boolean} True if any part of the element is on the screen. | |
*/ | |
function isVisible( ele ) { | |
var viewportTop = $(window).scrollTop(); | |
var viewportBottom = viewportTop + $(window).height(); | |
var eleTop = $(ele).offset().top; | |
var eleBottom = eleTop + $(ele).height(); |
This file contains 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 isScrolling = false; | |
$(document).ready(function(){ | |
var scrollTimeout = false; | |
var scrollTimeoutFn = function(){ | |
isScrolling=false; | |
scrollTimeout = false; | |
} | |
jQuery(window).bind('scroll', function(){ | |
isScrolling = true; | |
if(scrollTimeout){ |
This file contains 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 DATE_RFC2822 = "ddd, DD MMM YYYY HH:mm:ss ZZ"; | |
moment().format(DATE_RFC2822); |
This file contains 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 dataset = []; | |
/** | |
* Get an overall yes or no value for the cell. A no trumps a yes. | |
*/ | |
function imgVal(cell){ | |
var val; | |
$('img',cell).each(function(){ | |
var alt = $(this).attr('alt'); | |
if(alt === 'No'){ |
This file contains 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 countries = []; | |
// These states have no official languages, so override them with these ones. | |
var override = { | |
"United Kingdom": ['English'], | |
"United States": ['English'], | |
"Australia": ['English'], | |
"Mexico": ['Spanish'], | |
"Chile": ['Spanish'], | |
} |
OlderNewer