Skip to content

Instantly share code, notes, and snippets.

@evanwill
evanwill / map-js.html
Last active January 11, 2024 17:38
collectionbuilder map-js.html customization
{%- if site.data.theme.icons -%}{% assign icons = site.data.theme.icons %}{% else %}
{% assign cb_icons = site.pages | where: "name","cb-icons.svg" | first %}
{% assign icons = cb_icons.icons %}{%- endif -%}
{% if site.data.theme.map-child-objects == true %}
{%- assign items = site.data[site.metadata] | where_exp: 'item','item.objectid' -%}
{% else %}
{%- assign items = site.data[site.metadata] | where_exp: 'item','item.objectid' | where_exp: 'item','item.parentid == nil' -%}
{% endif %}
{% if page.location %}
@evanwill
evanwill / README.md
Last active May 16, 2023 01:03
CollectionBuilder-GH javascript-based Timeline layout replacement

CollectionBuilder-GH javascript-based Timeline layout replacement

If you need to sort BC dates or dates < 1000 AD, using the built in Liquid sorting doesn't work. This example implements a JS based version of the Timeline instead.

  1. From your metadata's "date" field create a new column "year" that is only the year, all values must be a number. For BC dates, the year should be a negative number.
  2. In your template replace "_layouts/timeline.html" and "_includes/js/timeline-js.html" with the version in this gist.

If you want to use TimelineJS feature, you will also want to edit the "assets/data/timelinejs.json" to use item.year rather than parsing the date.

@evanwill
evanwill / pannukakku-recipe.md
Created May 8, 2018 05:06
recipe for pannukakku finnish pancake

Pannukakku

Inspired by memories of Chocolate Moose in Ely, MN, and ancient ancestral foods, we wanted to create thick, custardy, Pannukakku oven pancakes. Partly based on a "Scandinavian food expert" website, we came up with this recipe.

Basic concept is to create a batter following the ratio of 1 egg : 1/4 cup flour : 1/4 cup milk, beating it well (usually about 8 eggs for a rectangle cake pan). Add:

  • vanilla extract (1 tsp)
  • a bit of sugar (1 - 2 Tbs)

Open Textbook on GitHub and gh-pages

Kris Shaffer, Bryn Hughes, and Brian Moseley, Open Music Theory, Hybrid Pedagogy 2014+.

Open Textbook =

  • open access: website
  • open source: GitHub repository
  • open license: cc-by-sa, you CAN copy, modify, and share it, as long as you attribute it and also openly license it.

Basically this open textbook is a Jekyll project, using Balzac theme, hosted on GitHub Pages. Thus:

@evanwill
evanwill / setup-jekyll-workshop.md
Created April 18, 2017 18:50
prep for jekyll workshop

Build a Website with Jekyll and GitHub Pages

Workshop Prep

To get ready for this workshop, please create a free GitHub account if you do not have one already. Basic familiarity with the GitHub web interface and Git will be helpful. Check out GitHub's hello world guide and Try Git.

Local Jekyll Setup

Using Cygwin

Cygwin is a project that adds Unix style terminal to Windows. It includes hundreds of Unix commandline utilities built and packaged to function natively on Windows. It includes more functionality than Git Bash (included with Git for Windows) and is open-source (unlike MobaXterm). If you are currently using Git Bash on Windows, you may want to move to Cygwin if you would like Nano Editor, wget, and GNU Make.

Install Cygwin

Download the current installation utility from the Cygwin site.

@evanwill
evanwill / commandline.md
Last active July 21, 2017 16:46
command line mini workshop

Intro to the Command Line

Does command line interface (CLI), REPL, terminal, console, or shell sound scary? Don't worry, we'll learn about the basic computer interface that gives you super powers! If you want to work with Raspberry Pi, Linux, or many programming languages you need a basic familiarity with the CLI. This MILL-Mini will demystify the terminal so you can use it to get things done.

What is the Shell?

The command line is a text-based interface for efficiently getting stuff done. It's often called the shell, terminal, console, cmd, or Bash, but ultimately the Shell is just a program on your computer like any other application. Its job is to act as a command shell, taking input from the user, ordering the computer's operating system (OS) to execute the instructions, and returning the outputs.

Burn SD or USB for Raspberry Pi and more!

MILL-Mini 2017-01-27. This session will take you through the Why and How of burning ISO/IMG files to SD or USB for single board computers or installing Linux.

Background

Burning a disk image or bootable USB stick is an important task if you want to use Raspberry Pi or Linux. When you buy a Windows, Chromebook, or Mac computer, the operating system (OS) comes pre-installed. However, if you are interested in running Linux or other open OS, you will most likely have to install it yourself.

@evanwill
evanwill / flickrdownload.md
Created October 6, 2016 08:56
get stuff off flickr

Need to download metadata from flickr?

You can bulk download stuff from flickr very easily now (which is a great feature), by going to Camera Roll, selecting things, and clicking download. Or you can bulk download your sets/albums now as well. This is handy, but it doesnt export any metadata you added to the photos in the system.

Unfortunately, I found none of the apps are very stable. The most recent and least broken apps are:

Use Jekyll Deploy command

jekyll-deploy adds a new jekyll command, accessed on the command line as jekyll deploy. It allows you to add a custom config to quickly deploy the site after build to a different destination.

install

Create a file in root project directory called Gemfile that contains: