Skip to content

Instantly share code, notes, and snippets.

View nezirz's full-sized avatar

nezir nezirz

View GitHub Profile
@eduardinni
eduardinni / youtubeID.rb
Last active July 31, 2022 12:39 — forked from takien/youtubeID.js
Get YouTube ID from various YouTube URL using Ruby
# Get YouTube ID from various YouTube URL
# Ruby port from JavaScript version: https://gist.github.com/takien/4077195/
def get_youtube_id(url)
id = ''
url = url.gsub(/(>|<)/i,'').split(/(vi\/|v=|\/v\/|youtu\.be\/|\/embed\/)/)
if url[2] != nil
id = url[2].split(/[^0-9a-z_\-]/i)
id = id[0];
else
@IanVaughan
IanVaughan / patron
Created November 21, 2015 14:46
patron gem fail
Installing patron 0.4.20 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/home/ubuntu/.rbenv/versions/2.2.3/bin/ruby -r ./siteconf20151121-13137-yck58r.rb extconf.rb
checking for curl-config... no
checking for main() in -lcurl... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options.