feat: refactor pagination implementation

This commit is contained in:
Cory Dransfeldt 2023-03-26 17:35:46 -07:00
parent ee77555c32
commit da793fd1cc
No known key found for this signature in database
196 changed files with 2498 additions and 36 deletions

View file

@ -1,8 +1,8 @@
---
title: Automatic Feedbin subscription backups
date: '2014-02-27'
tags: ['automation']
draft: false
title: Automatic Feedbin subscription backups
tags: ['automation']
---
A few weeks ago I switched from [Fever.](http://feedafever.com/ 'Fever° Red hot. Well read.') to [Feedbin](https://feedbin.me/ 'Feedbin'). I had been using Fever on a shared hosting account and, over the long term, was proving to be slower than I had expected it to be.<!-- excerpt --> So far Feedbin has proven to be considerably faster than my old Fever install and appears to be more actively developed (I've also been able to use Jared Sinclair's [Unread](http://jaredsinclair.com/unread/ 'Unread — An RSS Reader') — it's fantastic).

View file

@ -0,0 +1,12 @@
---
date: 2014-05-19
draft: false
title: Ben Thompson on net neutrality
tags: ['net neutrality']
---
**[Ben Thompson:](http://stratechery.com/2014/net-neutrality-wake-call)**
> It's not enough to insist that a position is morally right; it behooves us who believe in net neutrality to work through how the US can balance net neutrality with the need for ongoing broadband investment, fashion a case for our position, and then build a political movement that makes our plan a reality. That is being serious.<!-- excerpt -->
This is a fantastic piece on net neutrality by Ben Thompson. This is a balanced, realistic look at net neutrality and the issues surrounding it. It's refreshing to see a pragmatic and informed discussion of the topic. Well worth the read.

View file

@ -0,0 +1,10 @@
---
date: 2014-01-06
draft: false
title: Changes coming to Droplr
tags: ['iOS']
---
> Droplr began as an idea between two geeks who wanted an easy way to share files with each other. So we set aside some weekends and evenings and built an app that could do just that. Over the last few years what began as a simple free Mac App, has grown into a great company dedicated to creating the best possible way to share files.<!-- excerpt -->
If this helps Droplr grow and continue as a successful business, I'm all for it. I use the service daily to shorten links, share files and post images.

View file

@ -0,0 +1,14 @@
---
date: 2014-02-25
draft: false
title: Dumb pipes
tags: ['politics', 'net neutrality']
---
**[Ben Bajarin:](http://atbenbajarin.com/dumb-pipes/)**
> Smart devices were ultimately the downfall of the wireless carriers when all the value moved to the handset and its ecosystem rather than their own proprietary ecosystem. This is the fear that some cable companies must face. Could smart devices eventually do the same thing to them? We can only hope.<!-- excerpt -->
I can't help but agree with everything Ben Bajarin has to say in this post. Carriers and broadband providers acting as "dumb pipes" is the best outcome for consumers and I can't help but cheer every time a provider gets a step closer to that role.
I don't want any services tied to my cell or broadband providers' ecosystems. I want them to provide me with the fastest connection at the most reasonable price possible and then get out of the way.

View file

@ -0,0 +1,33 @@
---
date: 2014-10-15
draft: false
title: External links and redirects in Statamic navigation
tags: ['development', 'Statamic']
---
I put together a fieldset and template that allows external links to be added to the navigation of Statamic sites alongside internal links.<!-- excerpt --> To implement this in your site, the fieldset should look like the following:
```
title: Nav link
fields:
link:
display: Link
required: true
default:
type: text
content:
type: hidden
```
This fieldset should be accompanied by a template named link.html which will need to be added to your site's theme. The contents of the template are simply Statamic's [redirect example](http://www.statamic.com/learn/documentation/tags/redirect).
Now you should be able to create link pages in your Statamic admin panel that can then be added to your site's navigation. The pages created in the panel should create page files that look like the following:
```
title: Example link page
fieldset: link
template: link
link: http://example.com
```
Is there an easier or more effective way to do this? [Let me know.](mailto:hi@coryd.dev)

View file

@ -0,0 +1,44 @@
---
date: 2014-09-08
draft: false
title: Fastmail in Fluid.app
tags: ['email', 'Fastmail']
---
I've spent the last few months bouncing around OSX mail clients. I went from Mail.app to [Airmail](https://itunes.apple.com/us/app/id573171375?at=11lvuD), to a [Mailmate](http://freron.com) trial, back to Airmail and then back to Mail.app. Now, however, I've finally settled on a mail client: [Fastmail](https://www.fastmail.com/?STKI=11917049)'s web interface in a [Fluid](http://fluidapp.com) instance.<!-- excerpt -->
I've gone with the Fastmail web app for one simple reason: I wanted every mail client I tried to essentially be a native version of their web app. I would find myself working in Fastmail's web app rather than any given mail client I was trying out without even thinking about it. I would be viewing something in Safari and then jump to the web app — rather than a mail client — without even thinking about it.
Running Fastmail in a Fluid instance did, however, require a bit of setup. First, I set my newly created Fastmail.app up as my default mail client. Next, I modified the default Gmail URL handler created with the new Fluid instance to open mailto: links in Fastmail as follows:
```javascript
function transform(inURLString) {
inURLString = inURLString.replace('mailto:', '')
inURLString = inURLString.replace('&', '&')
var argStr = ''
var splits = inURLString.split('?')
var emailAddr = null
var args = {}
if (splits.length > 0) emailAddr = splits[0]
if (splits.length > 1) argStr = splits[1]
var outURLString = 'https://www.fastmail.com/mail/compose:to=' + emailAddr
if (argStr.length > 0) outURLString += '&' + argStr
return outURLString
}
```
Add this URL handler by going to the Fluid app's preferences, URL handlers and name the handler Fastmail with the pattern mailto:\*
Configuring the dock counter for the Fluid instance is also fairly straightforward and James Wilcox has [a great writeup on setting that up](http://jamesw.me/?p=347).
Are you currently using Fastmail in a Fluid instance? Or do you have a particular web client you prefer? I'm currently pretty happy with this setup and already have a few other ideas for URL handlers and scripts I plan on trying out.
If you don't use Fastmail, I would highly recommend it and you can [sign up for it here](http://www.fastmail.com/?STKI=11917049).
**Edit (10.29.2014):** Updated the script to reflect Fastmail's new TLD (.com as opposed to .fm that they previously used; thanks to [Keith Bradnam for the heads up](http://keithbradnam.com).
**Edit (1.29.2017):** Updated the compose URL to reflect Fastmail's new compose routing. Thanks [Fred Barker](http://fredbarker.com)!

View file

@ -0,0 +1,14 @@
---
date: 2014-04-30
draft: false
title: Sorting email using aliases and plus addressing in Fastmail
tags: ['email', 'Fastmail']
---
I subscribe to a number of mailing lists and, up until recently, had been using individual server-side rules to sort all incoming messages from those lists in to a specific folder. However, as the number of lists I was subscribed to grew, adding and maintaining individual rules became increasingly tedious.<!-- excerpt -->
To make managing messages from mailing lists easier, I've switched all of the mailing lists I subscribe to to an alias that is targeted at the specific folder I want them sorted in to. To set this up you need to create a new alias and target that alias at a specific folder using [plus addressing](https://www.fastmail.com/help/receive/addressing.html) as follows:
`fastmailusername+targetfolder@fastmail.com`
Now, instead of having to create a rule for each mailing list sender, I simply provide the alias that I have created and any messages received via that alias are sent directly to the folder I store mailing list messages in.

View file

@ -0,0 +1,12 @@
---
date: 2014-09-02
draft: false
title: Front on email
tags: ['email']
---
**[Via Front](http://blog.frontapp.com/email-will-last-forever/):**
> I can't help but agree. There are a number of great messaging solutions out right now but none are as ubiquitous, reliable or open as email. The chat / messaging space suffers from a lack of all of these attributes — chat is becoming increasingly fragmented as companies battle for dominance and revenue.<!-- excerpt -->
I would gladly trade Hangouts, GroupMe, WhatsApp, Line et al for a unified, open chat / messaging standard.

View file

@ -0,0 +1,12 @@
---
date: 2014-10-03
draft: false
title: ISPs secretly furious at Verizon
tags: ['net neutrality', 'politics']
---
**[Via Ars Technica](http://arstechnica.com/tech-policy/2014/10/isps-secretly-furious-at-verizon-scared-of-stronger-net-neutrality-rules/):**
> "Verizon seemingly won a huge victory in January when a federal appeals court struck down network neutrality restrictions on blocking and discriminating against Internet content over fixed broadband connections. But Verizon's lawsuit against the Federal Communications Commission could backfire, with the commission now considering even stronger rules on both fixed and wireless networks."<!-- excerpt -->
That's good news if I've ever heard it (though I suppose I shouldn't be overly optimistic). Anything that upsets ISPs and, ultimately, leads to stronger net neutrality rules is a win for consumers.

View file

@ -2,7 +2,7 @@
title: Leaving Google Apps for Fastmail
date: '2014-01-18'
draft: false
tags: ['email', 'fastmail', 'google']
tags: ['email', 'Fastmail', 'Google']
---
I recently began a process of re-evaluating the web services I use, the companies that provide them and an evaluation of where I store important data. I had used Google services extensively with Gmail handling my email, my contacts synced through Google contacts, calendars in Google calendar and documents in a Google Drive (I had used Google Reader extensively but switched to a [Fever](http://feedafever.com/ 'Fever Red hot. Well read.') installation following Reader's demise).<!-- excerpt --> While Google's services are world class, it became increasingly clear to me that if was not in my interest to store significant amounts of personal data with a company that has a financial interest in profiting from that information.

View file

@ -0,0 +1,28 @@
---
date: 2014-02-03
draft: false
title: Photo management with Dropbox and Hazel
tags: ['automation', 'Dropbox', 'macOS']
---
I recently abandoned iPhoto as a means of storing, organizing and managing photos on OSX and deactivated the associated [iCloud Photo Sharing](http://www.apple.com/icloud/icloud-photo-sharing.html 'iCloud Photo Sharing') feature running from iOS in to iPhoto via iCloud.<!-- excerpt --> I have replaced my iPhoto-based workflow with one centered around [Dropbox](http://dropbox.com) (which I have subscribed to for some time). I have been asked about this workflow and what follows is a brief explanation of what was involved with setting it up:
I began by exporting my iPhoto library to a folder using [Phoshare](http://code.google.com/p/phoshare/)[^iphoto]. I then created a simple [Hazel](http://www.noodlesoft.com/hazel.php) rule to scan my iPhoto library for duplicate images or videos and discard them. Clearing duplicates from my iPhoto library saved me 6 GB in space which either speaks to how disorganized my library was to begin with or how bloated iPhoto managed to make it.
After clearing duplicate files I created another rule to rename all photos based on the date they were taken and what they were taken with before then organizing them in to a subfolder based on that date. From there organization was simply a question of looking through each folder and appending an event title after the date the folder was named with.
Once all of the above rules were run on my Dropbox Photos directory I edited them to run on my [Dropbox Camera Uploads directory](https://www.dropbox.com/help/289/en 'How do I use Camera Upload?'). This allows me to upload photos via the iOS Dropbox app or import it directly from my camera and have Hazel auto-organize any content based on event date which I then label and move to a folder in the Photos folder named for the year in which the pictures were taken.
I now have more Dropbox space, an organized and easy to share photo library and a simple workflow for any and all photos I take (I take a lot).
This workflow allows me to keep all my photos (and all of my edited photos) unified across all devices that I use as well as the web. If I need to edit something I edit it in Photoshop and let Dropbox take care of making sure its everywhere I need it to be.
To view photos on the go, I use [Unbound](http://unboundapp.com 'Unbound') which allows me to quickly glance through and view images without having to store them directly on the device being used to view them.
I no longer have to wonder whether my photos made it to iPhoto on my MacBook Air through [iCloud Photo Sharing](http://www.apple.com/icloud/icloud-photo-sharing.html 'iCloud Photo Sharing') or any other device. Any photos I take on my phone are everywhere I need to be without having to worry because of Dropbox, as is the case with any photos I take with my camera (though the process of connecting that to a computer feels increasingly cumbersome).
I've seen more complex photo workflows than mine, but tend to prefer the simplicity of the default Dropbox app, a handful of rules and a little manual sorting. Now, I have all of my photos sorted and will have any other photos I take sorted going forward.
[You can download the rules I use here »](https://d.pr/m2tV 'Hazel rules for Dropbox Camera Uploads')
[^iphoto]: It's worth noting that Dropbox's app also allows you to pull your photos out of iPhoto's library file. If you import your photos this way, Dropbox attempts to sort them in to folders by date and iPhoto event. I found it easier to use Phoshare as it simply exports your photos in to a single folder, making it easier for Hazel to process them.

View file

@ -0,0 +1,10 @@
---
date: 2014-09-04
draft: false
title: Standard Markdown
tags: ['markdown']
---
**[Via Joe Steel](http://joe-steel.com/2014-09-04-Legitimate-Text-Processing.html):**
> This is about legitimizing their fork over all the others. Not just another fork here, this one is named "Standard Markdown"! — Joe Steel<!-- excerpt -->

View file

@ -0,0 +1,20 @@
---
date: 2014-10-20
draft: false
title: Streaming Music Has Left Me Adrift
tags: ['music']
---
[The New York Times has published an interesting piece on streaming music and the transition from analogue listening, CDs and other physical media.](http://www.nytimes.com/2014/10/19/magazine/streaming-music-has-left-me-adrift.html) What I find most interesting is the author, Dan Brooks', point about the effort involved in collecting music as versus now simply being able to search streaming services for available releases.<!-- excerpt -->
> When getting into a band became as easy as typing its name into a search box, particular musical tastes lost their function as signifiers of commitment. What you listened to ceased to be a measure of how much you cared and became a mere list of what you liked.
I used to be (and suppose I still am — to some extent) a fan of heavy metal. Almost all of the bands I listened to released records through small labels or independently with small print runs for each release being the norm. At the time, half the fun was not only finding new bands but actually _finding_ their releases so you could even listen to them. No band is all that great if everyone can listen to them and all that — exclusivity is king and all that (there was a sense of ownership or being in the know that came along with finding a new band and being able to refer fans of similar music to them).
Streaming services have eroded a lot of the excitement inherent in the old process of discovering new music. Now you can follow playlists or immediately stream just about anything anyone recommends to you (there are some notable exceptions — one of my favorite bands, Canadian punk act [NoMeansNo](http://www.nomeanswhatever.com), only has a greatest hits compilation distributed digitally). As silly as it is, I get less excited about finding new bands now and I tend to over-listen to releases I'm excited about, burn out on them and move on. As fans, we're less invested in what we're listening to because we didn't make the effort to discover it and the financial investment in a physical release or digital download to really attach us to it. Sure, we _are_ paying for music inasmuch as paying a [Spotify](http://spotify.com) or [Beats](http://www.beatsmusic.com) is paying for access to music ... but we're not directly supporting artists by buying those releases, by seeing the artwork, by having to go through the tea ceremony of pulling out a vinyl record and putting it on a turntable.
We have more access to music now than we've ever had, but we're much less invested in it. Maybe streaming proponents are right and streaming services will raise the money spent on music consumption in the aggregate, but I can't help but think we're losing something in the process. We've gained so much in the way of convenience and lost a lot with respect to the experience.
> My record collection is no longer a lifestyle, a biography, a status. The identities that I and a generation of fellow aesthetes spent our lives fashioning are suddenly obsolete. They turned out to be mere patterns of consumption, no more resilient than the patterns of production that provoked them.
Streaming has made music distribution far easier for artists and, really, I'm not advocating against streaming or somehow going back to any one physical medium (although I do enjoy collecting vinyl). I just feel as though streaming has stripped something special out of discovering and exploring new music. I hope, sincerely, that that experience is replaced by something else (perhaps music fans will go to more shows — I try to) or maybe streaming services will evolve in a way that produces a unique experience all its own. I'm not disappointed that we're moving past music in its traditional physical form, but I do have nostalgia for the years I spent ordering odd CDs from European metal distributors and anxiously awaiting their arrival in the mail.

View file

@ -0,0 +1,15 @@
---
date: 2014-08-06
draft: false
title: Sublime Text 3 - ctrl + tab key bindings
tags: ['Sublime Text']
---
I use [Sublime Text](http://sublimetext.com) as my primary text editor but have never liked the default tab behavior where ctrl + tab takes you to the most recently used tab rather than the next horizontal tab in the tab bar (ctrl + shift + tab does the reverse).<!-- excerpt -->
To fix this, I've added a few lines to the user key bindings file (located in Preferences > Key Bindings - User):
```json
{ "keys": ["ctrl+tab"], "command": "next_view" },
{ "keys": ["ctrl+shift+tab"], "command": "prev_view" }
```