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
| const slugify = (text) => { | |
| const from = "ãàáäâẽèéëêìíïîõòóöôùúüûñç·/_,:;"; | |
| const to = "aaaaaeeeeeiiiiooooouuuunc------"; | |
| const newText = text | |
| .split("") | |
| .map((letter, i) => | |
| letter.replace(new RegExp(from.charAt(i), "g"), to.charAt(i)) | |
| ); |
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
| import glob, os, time, subprocess, threading, datetime | |
| def updatelog(text): | |
| f = '/var/log/sbsonair.log' | |
| text = str(text) | |
| tm_stamp = datetime.datetime.now().strftime("%m/%d/%Y, %H:%M:%S.%f ") | |
| print(tm_stamp + text) | |
| with open(f, "a") as handle: | |
| handle.write(tm_stamp + text + '\n') |
This file has been truncated, but you can view the full file.
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
| Universal media converter | |
| 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) | |
| -h type=name -- print all options for the named decoder/encoder/demuxer/muxer/filter/bsf/protocol | |
| See man ffmpeg for detailed description of the options. |
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
| [share] | |
| comment=share | |
| path=/mnt/share | |
| public=yes | |
| guest ok=yes | |
| writable=no | |
| create mask=0644 | |
| directory mask=0755 | |
| browseable=yes |
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
| import logging, logging.handlers | |
| logger = logging.getLogger(__name__) | |
| logger.setLevel(logging.DEBUG) | |
| formatter = logging.Formatter("%(asctime)s %(name)s %(levelname)s %(message)s") | |
| streamhandler = logging.StreamHandler() | |
| streamhandler.setFormatter(formatter) | |
| logger.addHandler(streamhandler) | |
| timedfilehandler = logging.handlers.TimedRotatingFileHandler( | |
| filename="log//logfile.log", when="midnight", interval=1, encoding="utf-8" |
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
| import cv2 | |
| import glob | |
| from time import time | |
| import os | |
| import skvideo.io | |
| cap = cv2.VideoCapture("rtsp://210.216.76.121:554/sbsonair0", cv2.CAP_FFMPEG) | |
| class SplitWriter: |
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
| enable | |
| conf t | |
| no ip domain-look | |
| ena sec cisco | |
| line 0 | |
| logg sync | |
| exec-t 0 | |
| line vty 0 4 |
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
| const winston = require("winston"); | |
| const winstonDaily = require("winston-daily-rotate-file"); | |
| const appRoot = require("app-root-path"); | |
| const { createLogger } = require("winston"); | |
| const logDir = `${appRoot}/logs`; | |
| const { combine, timestamp, label, printf } = winston.format; | |
| const logFormat = printf(({ level, message, label, timestamp }) => { |
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
| local mp = require 'mp' | |
| local msg = require 'mp.msg' | |
| function setup_volume_meter() | |
| local tracks = mp.get_property_native("track-list") | |
| if not tracks then | |
| msg.warn("No track list found.") | |
| return | |
| end |
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
| #!/bin/bash | |
| set -e | |
| # Enable Adobe CSXS Extension Debug Mode | |
| defaults write com.adobe.CSXS.8 PlayerDebugMode 1 | |
| defaults write com.adobe.CSXS.11 PlayerDebugMode 1 | |
| defaults write com.adobe.CSXS.12 PlayerDebugMode 1 | |
| echo "✅ PlayerDebugMode enabled for:" | |
| echo " - com.adobe.CSXS.8" |
OlderNewer