-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add shot, allow posts to miss live link * use http for UCD, hopefully helps with flaky tests on ssl * add youtube timestamp reddit bot * add post excerpts * restyle footer, add page number to pagination update homepage, add excerpts to projects * update tests to handle new footer
- Loading branch information
1 parent
46757a4
commit c3fe9f3
Showing
17 changed files
with
176 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,36 @@ | ||
<div id="footer"> | ||
<a href="{{ site.data.links.theme }}"> | ||
<p class="text-tuncate">Theme by mattgraham</p> | ||
</a> | ||
</div> | ||
|
||
|
||
<footer> | ||
<div class="container"> | ||
{% if paginator.total_pages > 1 %} | ||
<div class="pagination flex-item"> | ||
{% if paginator.previous_page %} | ||
<a href="{{ paginator.previous_page_path | relative_url }}">« Prev</a> | ||
{% else %} | ||
<span>« Prev</span> | ||
{% endif %} | ||
|
||
{% for page in (1..paginator.total_pages) %} | ||
{% if page == paginator.page %} | ||
<em>{{ page }}</em> | ||
{% elsif page == 1 %} | ||
<a href="{{ '/projects' | relative_url }}">{{ page }}</a> | ||
{% else %} | ||
<a href="{{ site.paginate_path | relative_url | replace: ':num', page }}">{{ page }}</a> | ||
{% endif %} | ||
{% endfor %} | ||
|
||
{% if paginator.next_page %} | ||
<a href="{{ paginator.next_page_path | relative_url }}">Next »</a> | ||
{% else %} | ||
<span>Next »</span> | ||
{% endif %} | ||
</div> | ||
{% endif %} | ||
<div class="fixed" id="credit-footer"> | ||
<p class="text-tuncate"> | ||
<a href="{{ site.data.links.themeGithub }}">Theme</a> by <a href="{{ site.data.links.themeTwitter }}">mattgraham</a> | ||
</p> | ||
</div> | ||
</div> | ||
</footer> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
layout: post | ||
categories: personal | ||
|
||
project_title: "shot" | ||
src: https://github.com/ConorSheehan1/shot | ||
--- | ||
|
||
I recently published [shot](https://github.com/ConorSheehan1/shot), which stands for: **S**creenshot **H**elper for **O**SX **T**erminal. | ||
It a python CLI that I use day to day to copy / move / rename screenshots and videos. | ||
I also created a [much smaller bash implementation](https://gist.github.com/ConorSheehan1/2a72b13fa530388dcaec93307f4f7b09) first. | ||
|
||
I learned a lot about python packaging from building [osxdocker](/personal/2020/09/21/osxdocker.html), and decided not to publish this package to pypi since it's Mac/OSX specific. Instead I created [a homebrew tap](https://github.com/ConorSheehan1/homebrew-ConorSheehan1) to make it easy to install on mac, like this: | ||
* `brew install conorsheehan1/conorsheehan1/shot` | ||
|
||
It can still be installed via pip, just not from pypi. It can be pip installed from github like this: | ||
* `pip install https://github.com/ConorSheehan1/shot/releases/latest/download/shot.tar.gz` | ||
|
||
All installation options are listed at [https://github.com/ConorSheehan1/shot#install](https://github.com/ConorSheehan1/shot#install) | ||
I've found it fairly useful and I hope someone else will too. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
--- | ||
layout: post | ||
categories: personal | ||
|
||
project_title: "YouTubeTimestampRedditBot" | ||
src: https://github.com/ConorSheehan1/YouTubeTimestampRedditBot | ||
live: https://www.reddit.com/user/YouTubeTimestampBot | ||
--- | ||
|
||
I recently created [YouTubeTimestampRedditBot](https://github.com/ConorSheehan1/YouTubeTimestampRedditBot). It's a bot that checks reddit for posts which: | ||
1. link to YouTube | ||
1. reference a timestamp in the title | ||
1. don't embed the timestamp in the link | ||
|
||
It comments on those posts with an updated link that has the timestamp embedded, hopefully saving people precious milliseconds navigating to the time in the video. | ||
|
||
## Bot ranking | ||
While building this bot I learned that there are multiple bot ranking pages for reddit. | ||
1. [https://botrank.pastimes.eu](https://botrank.pastimes.eu/) | ||
1. [https://botranks.com](https://botranks.com/?bot=YouTubeTimestampBot) | ||
|
||
I prefer [botranks.com](https://botranks.com/?bot=YouTubeTimestampBot) because it's [open source on github](https://github.com/Brandawg93/Botranks) and has [my bot](https://botranks.com/?bot=YouTubeTimestampBot) listed! | ||
|
||
About a month into running my bot I found that there's already a similar bot called [reddit-timestamp-bot](https://github.com/ankitgyawali/reddit-timestamp-bot). | ||
It checks for timestamps in comments rather than titles, and has a very different implementation, so I'm going to keep mine running for now. | ||
|
||
## Hosting (heroku) | ||
I learned a lot about heroku while trying to host this bot, such as the fact that the free tier gives you [550 dyno hours per month](https://devcenter.heroku.com/articles/free-dyno-hours#free-dyno-hour-pool). Given a month with 31 days has 744 hours, this leaves me short about 194 hours or ~8 days per month. | ||
I also learned heroku doesn't accept revolute, so I can't get the extra 450 dyno hours by adding a payment method. And that I can't set up addons like heroku cron without adding a payment method, so I just have to deal with the ~8 days downtime per month. | ||
|
||
I got surprisingly positive responses on reddit. | ||
> Wow I am shocked. Someone made an actual fucking useful bot that isnt posting some stupid bullshit in shakespeare or yoda speak or giving me a pointless fact barely related to my comment. | ||
\- [u/The_lolrus_](https://old.reddit.com/r/TheDickShow/comments/qglluu/1700_video_glitch_just_moments_before_1st_smurf/hiao375/) | ||
|
||
> Wow! You are an intelligent bot! 🤖 | ||
\- [u/feeedi](https://old.reddit.com/r/donorconception/comments/q9tzkp/to_understand_what_epigenetics_is_watch_this/hgyk21r/) | ||
|
||
> Good bot, its sadly not possible to make timestamps on phone | ||
\- [u/RayliOtter](https://old.reddit.com/r/ADCMains/comments/q3eer6/at_525_they_talk_about_lethal_tempo_update_what/hfr660a/) | ||
|
||
The last comment about not being able to make timestamps on a phone easily is one of the main reasons I made the bot. | ||
I remember there used to be an option to include the current time when sharing a YouTube video on any device, but that feature disappeared a while ago. | ||
|
||
Of course there were a few bugs in the bot early on. And there's probably still more. But generally I'm happy with the bot for now and I plan to maintain it. | ||
I hope it saves you precious milliseconds. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
|
||
footer { | ||
@include headerFooter; | ||
position: fixed; | ||
bottom: 0; | ||
height: 50px; | ||
|
||
.container { | ||
display: flex; | ||
} | ||
.fixed { | ||
width: 200px; | ||
} | ||
.flex-item { | ||
flex-grow: 1; | ||
} | ||
|
||
.pagination { | ||
text-align: center; | ||
list-style: none; | ||
a, span { | ||
padding: 0.5em; | ||
} | ||
} | ||
|
||
#credit-footer { | ||
margin-left: auto; | ||
order: 2; | ||
} | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters