Skip to content

Instantly share code, notes, and snippets.

View dvanic's full-sized avatar

Darya Vanichkina dvanic

View GitHub Profile
@dvanic
dvanic / trello.md
Created August 3, 2021 04:36 — forked from jeremyzilar/trello.md
Copy Trello Board as text or markdown

Copy Trello Board as text or markdown

Wouldn't it be nice to copy out your Trello board as plain text or markdown to be able to put it in a weekly memo, shipping notice or release notes? Now you can!

How to use this

Copy this line of JS and paste it into the CONSOLE in your browser. The results will be saved to your clipboard.

Option 1: Copy your Trello Board as Markdown

This will copy your columns + cards as markdown right to left

var s = []; s.push("# " + jQuery(".board-header").children()[0].innerText); jQuery.fn.reverse = [].reverse; jQuery(".list:has(.list-header-name)").reverse().each(function() {s.push("\n## " + jQuery(this).find(".list-header-name-assist")[0].innerText + "\n"); jQuery(this).find(".list-card-title").each(function() {s.push("* " + this.innerText); }); }); copy(s.join("\n"));
@dvanic
dvanic / useful_pandas_snippets.py
Created August 17, 2016 07:31 — forked from bsweger/useful_pandas_snippets.md
Useful Pandas Snippets
#List unique values in a DataFrame column
pd.unique(df.column_name.ravel())
#Convert Series datatype to numeric, getting rid of any non-numeric values
df['col'] = df['col'].astype(str).convert_objects(convert_numeric=True)
#Grab DataFrame rows where column has certain values
valuelist = ['value1', 'value2', 'value3']
df = df[df.column.isin(valuelist)]