Skip to content

Instantly share code, notes, and snippets.

View furkanayhan's full-sized avatar

Furkan Ayhan furkanayhan

View GitHub Profile
@furkanayhan
furkanayhan / 0_reuse_code.js
Created September 28, 2015 06:41
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@furkanayhan
furkanayhan / blog_controller.rb
Last active February 3, 2016 11:22 — forked from petewarden/tumblrproxy.rb
You can mount your Tumblr Blog to your existing Rails app. Forked from: https://gist.github.com/petewarden/3950261
class BlogController < ApplicationController
def index
path = params[:path].to_s
source_url = 'http://yourblog.tumblr.com/' + path
source_content_type = ''
source_body = open(source_url) do |f|
source_content_type = f.content_type # "text/html"
f.read
end
if source_content_type == 'text/html'