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
// this is a hacky and brutal polyfill to somewhat implement zoom in firefox | |
// https://caniuse.com/#feat=css-zoom | |
// it allows to use jQuery's $('.element').css({zoom: 1.5}); | |
// there is no effort to actually implement a normal css polyfill | |
// this polyfill also doesn't work when the zoomed element has margins since they are used to fake the new size. | |
$.cssNumber.zoom = true; | |
if (!("zoom" in document.body.style)) { | |
$.cssHooks.zoom = { | |
get: function(elem, computed, extra) { |
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
{ | |
"globals" : | |
{ | |
"alwaysShowTabs" : true, | |
"defaultProfile" : "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}", | |
"initialCols" : 120, | |
"initialRows" : 30, | |
"keybindings" : | |
[ | |
{ |
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
Notes: | |
> use ffmpeg as native tool in OS (without using any third party library) | |
> create transport streams (ts) for better conversion and quality and speed | |
> use good CPU with GPU power | |
> run multiple ffmpeg instances in parallel | |
> AWS lambda for creating videos | |
Links: |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<!-- Main Meta Tags --> | |
<meta charset="utf-8" /> | |
<title>PAGE TITLE</title> | |
<meta name="description" content="PAGE TITLE" /> | |
<meta property="og:site_name" content="PAGE TITLE"> |
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
# stream video | |
ffmpeg -re -i live.mp4 -c:v libx264 -preset veryfast -maxrate 3000k \ | |
-bufsize 6000k -pix_fmt yuv420p -g 50 -c:a aac -b:a 160k -ac 2 \ | |
-ar 44100 -f flv "rtmp://rtmp-api.facebook.com:80/rtmp/" | |
# stream desktop | |
ffmpeg -video_size 1366x768 -framerate 25 -f x11grab -i :0.0 -ar 44100 -f alsa -ac 2 -i hw:0 -preset ultrafast output.mp4 -f flv "rtmp://rtmp-api.facebook.com:80/rtmp/" |
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
<?php | |
// create folder | |
$backupfile = 'dest_folder_name/file_name_' . date("Y-m-d") . '.tar.gz'; | |
system("tar -czf $backupfile src_folder"); | |
// database backup | |
$dbhost = "localhost"; // usually localhost | |
$dbuser = "user_name"; |
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
// create image (in working directory) | |
docker run -v "$(pwd):/usr/src/app" -p "4000:4000" starefossen/github-pages | |
// run container | |
docker start -i blog |
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
# Get rpi-source... easier than dkms shenanigans with headers from here | |
# https://www.niksula.hut.fi/~mhiienka/Rpi/linux-headers-rpi | |
sudo wget https://raw.githubusercontent.com/notro/rpi-source/master/rpi-source -O /usr/bin/rpi-source && sudo chmod +x /usr/bin/rpi-source && /usr/bin/rpi-source -q --tag-update | |
# Clean anything from a previous install | |
sudo rm -rfv /usr/src/4.4.11-v7 | |
sudo install bc |
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
<?xml version="1.0" encoding="utf-8"?> | |
<configuration> | |
<packageSources> | |
<add key="AspNetVNext" value="https://www.myget.org/F/aspnetvnext/api/v2/" /> | |
<add key="nuget.org" value="https://www.nuget.org/api/v2/" /> | |
</packageSources> | |
<disabledPackageSources /> | |
<activePackageSource> | |
<add key="nuget.org" value="https://www.nuget.org/api/v2/" /> | |
</activePackageSource> |
NewerOlder