Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Luis Serrano luisnomad

🏠
Working from home
View GitHub Profile
@luisnomad
luisnomad / BookMarklet Get YouTube poster image.html
Last active Sep 4, 2016
Get the current YouTube video's poster image (highest resolution available) with this simple Bookmarklet
View BookMarklet Get YouTube poster image.html
<a href ="javascript:(function()%7Bfunction%20getParameterByName(name)%20%7Bname%20%3D%20name.replace(%2F%5B%5C%5B%5D%2F%2C%20%22%5C%5C%5B%22).replace(%2F%5B%5C%5D%5D%2F%2C%20%22%5C%5C%5D%22)%3Bvar%20regex%20%3D%20new%20RegExp(%22%5B%5C%5C%3F%26%5D%22%20%2B%20name%20%2B%20%22%3D(%5B%5E%26%23%5D*)%22)%2Cresults%20%3D%20regex.exec(location.search)%3Breturn%20results%20%3D%3D%20null%20%3F%20%22%22%20%3A%20decodeURIComponent(results%5B1%5D.replace(%2F%5C%2B%2Fg%2C%20%22%20%22))%3B%7Dvar%20id%20%3D%20getParameterByName%20(%22v%22)%3Bif%20(typeof%20id%20!%3D%3D%20null%20%26%26%20id%20!%3D%3D%22%22)%20%7Bvar%20url%20%3D%20%22http%3A%2F%2Fimg.youtube.com%2Fvi%2F%22%20%2B%20id%20%2B%20%22%2Fmaxresdefault.jpg%22%3Bwindow.open(url%2C'_blank')%3B%7D%20else%20%7Balert%20(%22Activate%20the%20tab%20in%20your%20browser%20where%20the%20YouTube%20video%20is%20loaded%20and%20try%20again!%22)%3B%7D%7D)()">Grab Poster Image</a>
@luisnomad
luisnomad / Modify the URL without reloading the page
Created Sep 17, 2013
Modify the URL without reloading the page
View Modify the URL without reloading the page
// This can now be done in Chrome, Safari, FF4+, and IE10pp4+!
// Updating address bar with new URL without hash or reloading the page
// Example:
function processAjaxData(response, urlPath){
document.getElementById("content").innerHTML = response.html;
document.title = response.pageTitle;
window.history.pushState({"html":response.html,"pageTitle":response.pageTitle},"", urlPath);
@luisnomad
luisnomad / Use WordPress as a Database of Resources.md
Last active Dec 20, 2015
Use WordPress as a Database of Resources
View Use WordPress as a Database of Resources.md

Use WordPress as a Database of Resources

Developers, designers, Social Media & Marketings gurus... we all have many things in common. One of them: we browse the web and we find articles, tutorials and resources that we want to keep, because we might need them in the future.

We favourite tweets, we bookmark stuff, we subscribe to RSS feeds. But, it's that enough? We had Google Read, but it's dead now. Feedly seemed to be an option, but now they want to charge 5$ a month to be able to search through our articles (no way!). We have Pocket, but it's not a dedicated tool, and it's difficult to organize stuff in a way that we can quickly use it. And they might want to also charge us in the future, or they could just simply disappear.

Bottom line, depending on tools we don't fully control and that are not fully intended for our purpose is kind of dangerous. So, based on this, I decided to stop worrying about it and create my own tool. I need something I can rely on forever, a place I know I can turn to

You can’t perform that action at this time.