It is no longer necessary to use this script to have hardware acceleration in ffmpeg on Debian. The default Debian ffmpeg
and dependencies now support this out of the box.
See: #gistcomment-5095112
It is no longer necessary to use this script to have hardware acceleration in ffmpeg on Debian. The default Debian ffmpeg
and dependencies now support this out of the box.
See: #gistcomment-5095112
UPDATE (March 2020, thanks @ic): I don't know the exact AMI version but yum install docker
now works on the latest Amazon Linux 2. The instructions below may still be relevant depending on the vintage AMI you are using.
Amazon changed the install in Linux 2. One no-longer using 'yum' See: https://aws.amazon.com/amazon-linux-2/release-notes/
sudo amazon-linux-extras install docker
sudo service docker start
function clean_number($phone_number){ | |
$phone_number = preg_replace('/^0/','234',$phone_number); | |
$phone_number = preg_replace('/^\+/','',$phone_number); | |
return $phone_number; | |
} | |
// This should convert a number like 09023293092 or +2349023293092 to 2349023293092 |
# Install it as a yum package instead of throgh pip (will save you from lots of hassle) | |
# first get epel | |
sudo amazon-linux-extras install epel | |
# then install supervisor | |
sudo yum install supervisor |
from django.core.paginator import EmptyPage, PageNotAnInteger, Paginator | |
# First we create a little helper function, becase we will potentially have many PaginatedTypes | |
# and we will potentially want to turn many querysets into paginated results: | |
def get_paginator(qs, page_size, page, paginated_type, **kwargs): | |
p = Paginator(qs, page_size) | |
try: | |
page_obj = p.page(page) | |
except PageNotAnInteger: |
function PaystackFee() { | |
this.DEFAULT_PERCENTAGE = 0.015; | |
this.DEFAULT_ADDITIONAL_CHARGE = 10000; | |
this.DEFAULT_THRESHOLD = 250000; | |
this.DEFAULT_CAP = 200000; | |
this.percentage = this.DEFAULT_PERCENTAGE; | |
this.additional_charge = this.DEFAULT_ADDITIONAL_CHARGE; | |
this.threshold = this.DEFAULT_THRESHOLD; | |
this.cap = this.DEFAULT_CAP; |
These are notes while researching a way to convert a browser/website to a stream. This could be used for Facebook Live or for webrecording. TL'DR:
<?php | |
class PaystackFees | |
{ | |
const DEFAULT_PERCENTAGE = 0.015; | |
const DEFAULT_ADDITIONAL_CHARGE = 10000; | |
const DEFAULT_THRESHOLD = 250000; | |
const DEFAULT_CAP = 200000; | |
public static $default_percentage = PaystackFees::DEFAULT_PERCENTAGE; |