Skip to content

Instantly share code, notes, and snippets.

@Feddroid
Feddroid / snippet.txt
Created January 6, 2014 00:29
Prueba05012014
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<link rel="stylesheet" href="">
</head>
<body>
bu basudbhab
@Feddroid
Feddroid / fx.js
Created January 24, 2014 17:28
fs.js cambios
$(document).on('pageinit', '#home', function(){
var quer = "SELECT * FROM html WHERE url ='http://lalujuria.pe/productos.html'";
quer += " and xpath='//div[@id=\"contenedor_productos\"]'";
//var yql_query = "select * from html where url='" + news_url + story + "'";
// yql_query += " and xpatgith='//div[@id=\"content\"]'";
var url = "http://query.yahooapis.com/v1/public/yql?q=" +
encodeURIComponent(quer) + "&format=json";
@Feddroid
Feddroid / addtogcal.php
Created June 15, 2018 17:10 — forked from petertwise/addtogcal.php
Function to create Add to Google Calendar link
<?php
function squarecandy_add_to_gcal(
$name,
$startdate,
$enddate = false,
$description = false,
$location = false,
$allday = false,
$linktext = 'Add to gCal',
$classes = array('gcal-button, button')

gif-from-tweet

There are so many great GIFs out there and I want to have copies of them. Twitter makes that harder than it should be by converting them to MP4 and not providing access to the source material. To make it easier, I made a bash pipeline that takes a tweet URL and a filename, extracts the MP4 from that tweet and uses ffmpeg to convert back to GIF.

Dependencies

  • ffmpeg
    • macOS: brew install ffmpeg
    • Ubuntu/Debian: apt install ffmpeg