Skip to content

Instantly share code, notes, and snippets.

View praisegeek's full-sized avatar

Praise-God Emerenini praisegeek

  • Lagos, Nigeria.
View GitHub Profile
@kevinSuttle
kevinSuttle / meta-tags.md
Last active July 3, 2024 14:23 — forked from lancejpollard/meta-tags.md
List of Usable HTML Meta and Link Tags
@Medalink
Medalink / folder_to_smil.php
Created October 1, 2012 16:17
SMIL Generator
<pre>
SMIL Information:
<?php
// RTMP URL
define( "RTMP_URL", "rtmp://glc.us.com/vod" );
// Video Directory.
//define( "VIDEO_DIR", realpath( dirname( __FILE__ ) . "/glcmedia/video/" ) );
// Manual
define( "VIDEO_DIR", realpath( "/Server/www/GLC/glc.us.com/trunk/glcmedia/video" ) );
@astro
astro / hlsdump.js
Created September 5, 2013 15:45
Reliably record an HTTP Live Stream with node.js
var fs = require('fs');
var request = require('request');
var joinUrl = require('url').resolve;
if (process.argv.length != 3) {
console.log("Please pass playlist URL");
process.exit(1);
}
var plsUrl = process.argv[2];
var INTERVAL = 5 * 1000;
@ipalaus
ipalaus / ApiController.php
Last active August 17, 2018 23:06
Using cursor instead of pagination with Fractal. IE: GET /users?cursor=5
<?php
use League\Fractal\Manager;
use League\Fractal\Resource\Collection;
use League\Fractal\Resource\Item;
use League\Fractal\Cursor\CursorInterface;
class ApiController extends Controller
{
@marteinn
marteinn / InteractiveScrollView.java
Last active May 2, 2023 22:35
ScrollView with a OnBottomReachedListener for Android. MIT license (https://opensource.org/licenses/MIT).
package se.marteinn.ui;
import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.widget.ScrollView;
/**
* Triggers a event when scrolling reaches bottom.
@raix
raix / image-uploader.html
Last active October 13, 2023 00:08
cfs image uploader example
<template name="imageUploader">
<h2>Picture</h2>
<p>
{{#each images}}
<img src="{{url}}" alt="">
<input type="button" value="remove" class="btnRemove"/>
{{else}}
No files uploaded.
{{/each}}
</p>
@brigand
brigand / git.md
Created October 6, 2014 02:50
My Git Aliases

I use git a lot for work and other projects, so I invested the time in creating some high quality aliases that really work for me. These just go in your bash profile (~/.bash_profile or ~/.bashrc or ~/.profile depending on your OS).

I see a lot of people go overboard with aliases, and then end up not using them. They're meant to cover 95% of the commands I use, not 100%.

alias gcam='git commit -am'
alias gs='git status'
alias gplr='git pull --rebase'
alias gpsh='git push'
alias gpo='git push -u origin `git symbolic-ref --short HEAD`'
@fomightez
fomightez / remove blank lines regex.md
Last active June 5, 2024 01:40
remove all blank lines using regular expressions
@c9s
c9s / .babelrc
Last active October 21, 2023 14:04
webpack + babel + typescript + es6 - total solutions!
{
"presets": ["es2015"],
"plugins": ["transform-runtime"]
}
@Brainiarc7
Brainiarc7 / ffmpeg-gnu-parallel-snippets.md
Last active May 22, 2024 19:05
Some snippets you can quickly adapt for use with FFmpeg and GNU Parallel for use for standard tasks.

Useful Examples of ffmpeg and GNU parallel on the command-line:

Transcoding FLAC music to Opus:

ffmpeg is a highly useful application for converting music and videos. However, audio transcoding is limited to a a single core. If you have a large FLAC archive and you wanted to compress it into the efficient Opus codec, it would take forever with the fastest processor to complete, unless you were to take advantage of all cores in your CPU.

parallel 'ffmpeg -v 0 -i "{}" -c:a libopus -b:a 128k "{.}.opus"' ::: $(find -type f -name '*.flac')

Transcoding Videos to VP9: