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
/* Crop post featured image. */ | |
.wpbf-post-image-wrapper { | |
max-height: 400px; | |
overflow: hidden; | |
} | |
.wpbf-post-image-wrapper img { | |
display: block; | |
width: 100%; | |
margin:-21.875% 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
#!/bin/bash | |
# Variables. | |
backup_dir="backups" | |
files_dir="/var/www/yoursite" # Don't add trailing slash. | |
max_backups=14 # Two weeks. | |
database_name="yoursite" | |
timezone="US/Eastern" | |
# Check if script is running as root. |
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
import os, gi, time | |
gi.require_version("Gst", "1.0") | |
from gi.repository import GObject, Gst | |
Gst.init(None) | |
pipeline = Gst.Pipeline() | |
bus = pipeline.get_bus() | |
# Variables. | |
hls_uri = "your_hls_uri" |
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
import os, gi | |
gi.require_version("Gst", "1.0") | |
from gi.repository import GObject, Gst | |
Gst.init(None) | |
pipeline = Gst.Pipeline() | |
# Variables. | |
youtube_stream_key = "your_key_here" | |
encoder_speed = "ultrafast" |
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
import gi | |
gi.require_version('Gst', '1.0') | |
from gi.repository import GObject, Gst | |
Gst.init(None) | |
class Main: | |
def __init__(self): | |
self.pipeline = Gst.Pipeline.new("pipeline") | |
self.bus = self.pipeline.get_bus() |
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
import gi | |
gi.require_version('Gst', '1.0') | |
from gi.repository import GObject, Gst | |
from threading import Thread, Event | |
Gst.init(None) | |
class Main: | |
def __init__(self): | |
self.pipeline = Gst.Pipeline.new("pipeline") |
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
import gi | |
gi.require_version('Gst', '1.0') | |
from gi.repository import GObject, Gst | |
from threading import Thread, Event | |
Gst.init(None) | |
class Main: | |
def __init__(self): | |
self.pipeline = Gst.Pipeline.new("pipeline") |
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
import gi | |
gi.require_version('Gst', '1.0') | |
from gi.repository import GObject, Gst | |
Gst.init(None) | |
class Main: | |
def __init__(self): | |
self.pipeline = Gst.Pipeline.new("pipeline") | |
self.bus = self.pipeline.get_bus() |
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
import gi | |
gi.require_version('Gst', '1.0') | |
from gi.repository import GObject, Gst | |
import os | |
Gst.init(None) | |
# Short way: | |
# pipeline = Gst.parse_launch("filesrc name=filesource ! decodebin ! autovideosink") | |
# pipeline.get_by_name("filesource").set_property("location", "background.mov") |
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
import gi | |
gi.require_version('Gst', '1.0') | |
from gi.repository import GObject, Gst | |
import os | |
Gst.init(None) | |
mainloop = GObject.MainLoop() | |
# Short way: | |
# pipeline = Gst.parse_launch("filesrc name=filesource ! decodebin ! autovideosink") |
NewerOlder