Skip to content

Instantly share code, notes, and snippets.

View ognjenio's full-sized avatar

Ognjen Regoje ognjenio

View GitHub Profile
@ognjenio
ognjenio / d.rb
Last active August 19, 2021 05:26
Script for quick adding notes to Dendron
## To add extract the open graph things
require 'optparse'
require 'metainspector'
def note(title, url, tags, content, desc = nil)
return %Q|---
title: #{title}
desc: #{desc if !desc.to_s.empty?}
#{"source: #{url if !url.to_s.empty?}"}
@ognjenio
ognjenio / i.rb
Last active May 12, 2021 01:19
Script for generating indexes for Dendron
require 'optparse'
require 'find'
def note(path, files)
return %Q|---
title: #{path} Index
desc: ''
updated: #{Time.now.to_i * 1000}
created: #{Time.now.to_i * 1000}
---
# config/initializers/will_paginate.rb
module WillPaginate
module ActionView
def will_paginate(collection = nil, options = {})
options[:renderer] ||= BootstrapLinkRenderer
super.try :html_safe
end
class BootstrapLinkRenderer < LinkRenderer