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 | |
############################################################################### | |
# | |
# Description: | |
# Script generates Nimble session-friendly playlists | |
# (parent playlist with sub-playlists inside) and supervisor program/job | |
# of ffmpeg process which pulls from provided source address $ch_source and | |
# pushes to localhost nibmle-origin server as a name $ch_res for later HLS transmuxing | |
# |
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
/* ----------- iPad 1, 2, Mini and Air ----------- */ | |
/* Portrait and Landscape */ | |
@media only screen | |
and (min-device-width: 768px) | |
and (max-device-width: 1024px) | |
and (-webkit-min-device-pixel-ratio: 1) { | |
} |
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
/* | |
example: | |
$count_from = "2010-09-30 00:00:01"; // 24-Hour Format: YYYY-MM-DD HH:MM:SS" | |
$count_to = date("Y-m-d H:i:s");//today (2012-08-23 00:00:01) | |
echo datediff("d",$count_from,$count_to); | |
return: 693 (days) | |
*/ | |
function datediff($interval, $datefrom, $dateto, $using_timestamps = false) { | |
/* |
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 fs = require('fs'), | |
stub = require('./stub'), | |
_ = require('underscore'), | |
request = require('request'); | |
// config for local file | |
var basePath = "images/", | |
data = stub.data, | |
urlRoot = "http://cdn.catalogs.com/"; |
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
/*! jquery.getJSONP */ | |
var jsonp={_config:{id:"fileName"},_callback:{},_params:{},init:function(a){jsonp.parse(a)},parse:function(a){if(!a.hasOwnProperty("meta")||!a.meta.hasOwnProperty(this._config.id)||!jsonp._callback.hasOwnProperty(a.meta[this._config.id]))return"error: jsonp malformed. Wrong meta";var b=jsonp._callback[a.meta.fileName];var p=jsonp._params[a.meta.fileName];delete jsonp._callback[a.meta.fileName];delete jsonp._params[a.meta.fileName];return b(a,p)}}; | |
(function(a){a.getJSONP=function(b,c,d,p){return a.fn.getJSONP(b,c,d,p)};a.fn.getJSONP=function(b,c,d,p){b=b||!1;c=c||!1;d=d||!1;p=p||!1;"function"==a.type(c)&&(p=d,d=c,c={});if(!b||!d)return"getJSONP error: not url or callback";var e=b.split("/").reverse()[0];jsonp._callback[e]=d;jsonp._params[e]=p;a.getJSON(b+"?callback=?&_="+$.now(),c)}})(jQuery); |
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
#sudo nano /etc/xdg/lxsession/LXDE/autostart | |
@xset s off | |
@xset -dpms | |
@xset s noblank | |
#@midori -e Fullscreen -a https://www.leftronic.com/app/#Csmygr/aglYsPYxq | |
@midori -e Fullscreen https://www.leftronic.com/app/#Csmygr/aglYsPYxq |
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() { | |
var lastTime = 0; | |
var vendors = ['ms', 'moz', 'webkit', 'o']; | |
for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) { | |
window.requestAnimationFrame = window[vendors[x]+'RequestAnimationFrame']; | |
window.cancelAnimationFrame = window[vendors[x]+'CancelAnimationFrame'] | |
|| window[vendors[x]+'CancelRequestAnimationFrame']; | |
} | |
if (!window.requestAnimationFrame) |
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 start = new Date().getTime(), | |
time = 0, | |
elapsed = '0.0'; | |
function instance() | |
{ | |
time += 100; | |
elapsed = Math.floor(time / 100) / 10; | |
if(Math.round(elapsed) == elapsed) { elapsed += '.0'; } |
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
echo; | |
echo "Memoria actual..."; | |
echo; | |
free -m; | |
sudo sync; | |
sudo sysctl -w vm.drop_caches=3; | |
echo "Memoria liberada..."; | |
echo; | |
echo; | |
free -m; |
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
// Math.floor | |
Math.floor(89.938 / 293.3); | |
Math.floor(83784 / 9289.2); | |
Math.floor(7 / 60); | |
// Math.round | |
Math.round(89.938 / 293.3); | |
Math.round(83784 / 9289.2); | |
Math.round(7 / 60); |
NewerOlder