Skip to content

Instantly share code, notes, and snippets.

@kdavh
kdavh / gist-readme.md
Last active April 5, 2026 01:19
WorkFlowy export script — produces clean markdown with embedded attachments (images, PDFs, videos)

WorkFlowy Export Script

WorkFlowy's built-in export is frustrating. You can export your data, but images, PDFs, videos, and other attachments come out completely disconnected from your notes — a disorganized mess that's painful to make sense of.

This script fixes that. Paste it into your browser's DevTools console on any WorkFlowy page, and it exports your outline as clean markdown with all attachments properly linked and downloaded alongside it.

Note: This will get out of date quickly because it's based off of Workflowy's current frontend page structure. It is not maintained.

What it exports

@kdavh
kdavh / extend_module.rb
Created April 13, 2013 21:42
Question about scope when using `exend ModuleName` and `::define_method` in a class
module M
def i_method
define_method(:new_method) do
"I am from i_method, but I should be an instance method"
end
end
end
class C
extend M
@kdavh
kdavh / gist:5332969
Last active December 15, 2015 22:29
problem with hardcoded html form used with rails
##### CODE IN models/users/show.html.erb ######
<%= form_for user do |f| %>
<%= f.label :name %>
<%= f.text_field :name %>
<% Team.all.each do |team|%>
<%= check_box_tag( "user[team_ids][]", team.id,
user.team_ids.include?(team.id),
id: "user_team_ids_#{team.id}"
@kdavh
kdavh / gist:5126962
Created March 10, 2013 03:16
Confusing behavior by Ruby Debugger using 'n' (or next) command.
[5] pry(main)> prime? 5
[2, 11] in /Users/kdavh/Google Drive/cs/2013 App Academy/Coursework/w1d1/primes.rb
2 require 'debugger'
3
4 def prime?(num)
5 debugger
6
=> 7 (2..num/2).each do |i|
8 if (num % i) == 0
@kdavh
kdavh / dabblet.css
Created November 16, 2012 17:43
Ratings Stars
/*
Ratings Stars
(with as little code as possible)
*/
.rating {
unicode-bidi: bidi-override;
direction: rtl;
text-align: center;
}
.rating > span {