Skip to content

Instantly share code, notes, and snippets.

View tingplenting's full-sized avatar

Kar tingplenting

  • tingplenting.github.io
  • Yogyakarta, Indonesia
View GitHub Profile
@tingplenting
tingplenting / encode.sh
Created September 18, 2018 02:04 — forked from mikoim/README.md
YouTube recommended encoding settings on ffmpeg (+ libx264)
#/bin/sh
ffmpeg -i input -c:v libx264 -preset slow -profile:v high -crf 18 -coder 1 -pix_fmt yuv420p -movflags +faststart -g 30 -bf 2 -c:a aac -b:a 384k -profile:a aac_low output
@tingplenting
tingplenting / pagination-collection.liquid
Created May 10, 2018 06:42 — forked from Phlow/pagination-collection.liquid
If you need pagination for a collection in a Jekyll theme, you can use the following Liquid logic which works also on Github pages
{% comment %}
#
# I modified the original code from http://anjesh.github.io/2015/01/25/collection-pagination-working-github-pages/
#
# Make a collection in _config.yml and create the folder _your_collection in your root.
#
# collections:
# your_collection:
# output: true
# permalink: /:collection/:title/
/**
* Insert an attachment from an URL address.
*
* @param String $url
* @param Int $post_id
* @param Array $meta_data
* @return Int Attachment ID
*/
function crb_insert_attachment_from_url($url, $post_id = null) {
@tingplenting
tingplenting / pinterest-sort-repins.js
Created March 20, 2016 02:45 — forked from techslides/pinterest-sort-repins.js
Auto Sort Pinterest Pins by Repins
//Go to any page with pins (a board, your pins, search results, etc) and open JavaScript Console (Ctrl+Shift+J on windows OR option+command+J on mac) and paste in this code:
//sort by repins, adjust amount of pins/pages you want to collect first
var pages = 5;
var count = 0;
var mylist = [];
var timeout;
load();
function load(){
@tingplenting
tingplenting / spintax.php
Created December 13, 2015 16:36 — forked from irazasyed/spintax.php
PHP: Text Spinner Class - Nested spinning supported.
<?PHP
/**
* Spintax - A helper class to process Spintax strings.
* @name Spintax
* @author Jason Davis - https://www.codedevelopr.com/
* Tutorial: https://www.codedevelopr.com/articles/php-spintax-class/
*/
class Spintax
{
public function process($text)