Skip to content

Instantly share code, notes, and snippets.

Avatar
😁
Hacking for performance and less resources usage!

Misiek misiek08

😁
Hacking for performance and less resources usage!
View GitHub Profile
@misiek08
misiek08 / ffmpeg.md
Created Apr 15, 2019 — forked from dvlden/ffmpeg.md
Convert video files to MP4 through FFMPEG
View ffmpeg.md

This is my personal list of functions that I wrote for converting mov files to mp4!

Command Flags

Flag Options Description
-codec:a libfaac, libfdk_aac, libvorbis Audio Codec
-quality best, good, realtime Video Quality
-b:a 128k, 192k, 256k, 320k Audio Bitrate
-codec:v mpeg4, libx264, libvpx-vp9 Video Codec
@misiek08
misiek08 / 0-README.md
Created Dec 6, 2018 — forked from Overbryd/0-README.md
Cloudflare Fragment Caching
View 0-README.md

Cloudflare fragment rendering/caching

This worker script will evaluate your origin response, and replace html comments marked as fragment:key with a respective prefetch defined in a X-Fragments response header.

Usage

Your origin must include the X-Fragments header, specifying the a comma separated list of prefetch requests to make for that response.

< HTTP/1.1 200 OK
@misiek08
misiek08 / gist:fd01946136c149a3e7950a9152fc4fb5
Created Oct 18, 2017
basic, incomplete regex for parsing html tag arguments
View gist:fd01946136c149a3e7950a9152fc4fb5
\b([^\s=]+)=("((?:[^"\\]+(?:\\")?)+)"|'((?:[^'\\]+(?:\\')?)+)')
@misiek08
misiek08 / gist:90efd270e275732033dc
Created Jan 25, 2015
openresty build for debian v2
View gist:90efd270e275732033dc
apt-get install libreadline-dev libncurses5-dev libpcre3-dev libssl-dev perl make libgeoip-dev
./configure --with-http_realip_module --with-http_addition_module --with-http_geoip_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_gzip_static_module --with-http_auth_request_module --with-http_random_index_module --with-http_secure_link_module --with-http_degradation_module --with-http_stub_status_module --with-http_iconv_module -j10 --user=www-data --group=www-data --with-file-aio --with-ipv6
make
make install
@misiek08
misiek08 / gist:7988b3b9a9911e35d0b3
Created Aug 10, 2014
PHP class for parsing HTTP multipart/form-data request body
View gist:7988b3b9a9911e35d0b3
<?php
class HttpMultipartParser
{
public function parse_multipart($stream, $boundary = null)
{
$return = array('variables' => array(), 'files' => array());
$partInfo = null;
View gist:6593437
SELECT * FROM bought_items bi JOIN items i ON (i.id = bi.item_id) WHERE i.title LIKE %% OR username LIKE %%
@misiek08
misiek08 / gist:6566480
Created Sep 14, 2013
Prism.js with nginx highlighting
View gist:6566480
/**
* Prism: Lightweight, robust, elegant syntax highlighting
* MIT license http://www.opensource.org/licenses/mit-license.php/
* @author Lea Verou http://lea.verou.me
*/(function(){var e=/\blang(?:uage)?-(?!\*)(\w+)\b/i,t=self.Prism={util:{type:function(e){return Object.prototype.toString.call(e).match(/\[object (\w+)\]/)[1]},clone:function(e){var n=t.util.type(e);switch(n){case"Object":var r={};for(var i in e)e.hasOwnProperty(i)&&(r[i]=t.util.clone(e[i]));return r;case"Array":return e.slice()}return e}},languages:{extend:function(e,n){var r=t.util.clone(t.languages[e]);for(var i in n)r[i]=n[i];return r},insertBefore:function(e,n,r,i){i=i||t.languages;var s=i[e],o={};for(var u in s)if(s.hasOwnProperty(u)){if(u==n)for(var a in r)r.hasOwnProperty(a)&&(o[a]=r[a]);o[u]=s[u]}return i[e]=o},DFS:function(e,n){for(var r in e){n.call(e,r,e[r]);t.util.type(e)==="Object"&&t.languages.DFS(e[r],n)}}},highlightAll:function(e,n){var r=document.querySelectorAll('code[class*="language-"], [class*="language-"] code, code[
View gist:6542900
http://foundation.zurb.com/
http://gumbyframework.com/
http://ink.sapo.pt/
http://getbootstrap.com/
http://designmodo.com/demo/flat-ui/
You can’t perform that action at this time.