Skip to content

Instantly share code, notes, and snippets.

@carloscarucce
carloscarucce / imageProxy.php
Last active March 10, 2024 09:55 — forked from nicoptere/imageProxy.php
basic PHP image proxy (that works ... )
<?php
$url = isset($_GET['url']) ? $_GET['url'] : null;
if (!$url) {
die('Please, inform URL');
}
$imgInfo = getimagesize( $url );
This file has been truncated, but you can view the full file.
9254835974458887629672873635789957411886024698554157393849494864228024962939550688297074527198420261051675205999609689838587412
7948702662533481896767559573369920938242346354580061545409242090168773727371802699309443935396635866263937828773324526334321892
7929250312741837331511829643632683169694074912332726993582394725302853411901337696207186358524323117172520907433878952968176465
9486937364148093931718552300016332142708943190856638524388888569011747617956915519539025796115901484762122047712200094207683584
0703675740855407318047361595661595146837376373951978537785605481083388906490085533348547865459237835407372374738389274773789264
3524314516560200536698529022539598732463389124803873184044464663165630452635665559603483233341839268186056673186867104904449866
3388466377320953222057779182433549144340237502432464295061371141084500222833875925546082542869030852833895137466510262849050187
2359980877010447170873386178573828860442255448874794721230413368694441497441338856684036949118353204002591974711928301953002372
@dvlden
dvlden / ffmpeg.md
Last active April 17, 2024 19:53
Convert video files to MP4 through FFMPEG

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
{"lastUpload":"2021-03-27T09:34:06.214Z","extensionVersion":"v3.4.3"}
@nakulrathore
nakulrathore / twitter_heart_animation
Created June 19, 2017 13:58
Twitter heart Animation pure css
<head>
<style>
.heart {
width: 100px;
height: 100px;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
background: url(https://raw.githubusercontent.com/nakulrathore/materialcolors/gh-pages/heart.png) no-repeat;
@ahmadawais
ahmadawais / upload-a-file.MD
Created June 18, 2017 11:07 — forked from websupporter/upload-a-file.MD
Upload a file using the WordPress REST API

Upload files

Using the REST API to upload a file to WordPress is quite simple. All you need is to send the file in a POST-Request to the wp/v2/media route.

There are two ways of sending a file. The first method simply sends the file in the body of the request. The following PHP script shows the basic principle:

@amboutwe
amboutwe / yoast_seo_canonical_change_woocom_shop.php
Last active April 11, 2024 02:02
Code snippets for the Yoast SEO canonical output
<?php
/********* DO NOT COPY THE PARTS ABOVE THIS LINE *********/
/* Change the canonical link for the shop page
* Credit: Scott Weiss of somethumb.com
* Yoast Doc: https://developer.yoast.com/features/seo-tags/canonical-urls/api/
* Last Tested: Jan 25 2017 using Yoast SEO 6.0 on WordPress 4.9.1
*/
add_filter( 'wpseo_canonical', 'yoast_seo_canonical_change_woocom_shop', 10, 1 );

Direct copy of pre-encoded file:

$ ffmpeg -i filename.mp4 -codec: copy -start_number 0 -hls_time 10 -hls_list_size 0 -f hls filename.m3u8

@elalemanyo
elalemanyo / ampify_img.php
Last active August 27, 2021 12:33
Make img AMP-ready
<?php
/**
* Replace img tag with amp-img
*
* <amp-img src="[src]"
* width="[width]"
* height="[height]"
* layout="responsive"
* alt="[alt]">
* </amp-img>
@x011
x011 / imacros-cheatsheet.md
Created October 7, 2016 12:07
iMacros Command, Variable, and function reference