I hereby claim:
- I am mxlje on github.
- I am mxlje (https://keybase.io/mxlje) on keybase.
- I have a public key whose fingerprint is 2ADF A1D9 FDC5 5C54 1DCE 1356 A039 EA57 86C1 43E2
To claim this, I am signing this object:
if (req.http.Cookie) { | |
set req.http.Cookie = regsuball(req.http.Cookie, "(^|; ) *__utm.=[^;]+;? *", "\1"); # removes all cookies named __utm? (utma, utmb...) - tracking thing | |
if (req.http.Cookie == "") { | |
remove req.http.Cookie; | |
} | |
} |
@mixin outline($color: red) | |
outline: 1px solid $color |
<h1>The Document Outline in HTML - When to use a heading tag for a heading?</h1> | |
<p><strong> On a lot of websites, especially the ones with ready made templates, we see that the heading tags <code><h1></code> to <code><h6></code> are used incorrectly. This happens as the differention between style and markup is not considered in the right way. </strong></p> | |
<p>To make a nice looking website, you need only two files:</p> | |
<ol> | |
<li>an HTML Document for the structure</li> | |
<li>a CSS File for the styling</li> | |
</ol> |
organizer = Organizer.create( | |
email: "a@b.com", | |
company_name: "Example Company", | |
password_digest: "$2a$10$qQQws7Kb2IG1qfqp4OgdZ.dtKicGew79HZkWUO0gzaerhkC6/3OuC" | |
) | |
Event.create( | |
name: "Awesome Event", | |
description: "Lorem Ipsum", | |
organizer: organizer, |
I hereby claim:
To claim this, I am signing this object:
class Redcarpet::Render::HTML | |
def footnote_ref(number) | |
@article_id ||= [*('a'..'z'),*('0'..'9')].shuffle[0,4].join | |
fn_ref = "<sup id='fnref-#{@article_id}-#{number}'>" | |
fn_ref << "<a href='#fn-#{@article_id}-#{number}' rel='footnote'>" | |
fn_ref << "#{number}</a></sup>" | |
end | |
def footnote_def(content, number) |
# Checks status code of multiple URLs and prints them | |
require "mechanize" | |
urls = [ | |
'http://maxlielje.co' | |
] | |
@agent = Mechanize.new |
# run this in the terminal | |
# via http://ruby5.envylabs.com/episodes/419-episode-383-july-2-2013 | |
ruby -run -e httpd . -p 5000 |
class String | |
# remove protocol, www, and trailing slash from URL string | |
def to_clean_url | |
u = self | |
if u.start_with?('http://www.') | |
u = u[11..-1] | |
elsif u.start_with?('https://www.') | |
u = u[12..-1] | |
require 'sinatra' | |
require 'data_mapper' | |
require 'json' | |
# Authentication | |
# use Rack::Auth::Basic, "Restricted Area" do |username, password| | |
# username == 'admin' and password == 'admin' | |
# end | |
# set json as content type for all requests |