import old posts

found the source for my old php site.
https://github.com/benharri/benhh.com
This commit is contained in:
Ben Harris 2021-03-26 14:27:12 -04:00
parent ecc6e88d9d
commit 8462576ab1
10 changed files with 262 additions and 0 deletions

View File

@ -0,0 +1,16 @@
---
title: Blue Lives Matter? I thought All lives matter
date: 2016-07-18
tags:
- politics
- conventions
---
\#BlueLivesMatter completely misses the point. And it makes #AllLivesMatter hypocritical.
![](http://chainsawsuit.com/wp-content/uploads/2016/07/20160707_allhousesredux-506x500.png)
This cartoon says it all.
The same people that pioneered the #AllLivesMatter movement are now claiming that #BlueLivesMatter. Do they not understand the irony of this?
By claiming that all lives matter, this minimizes the importance of lives that currently need the attention, much like the house on fire in the cartoon above.

45
content/grav-on-heroku.md Normal file
View File

@ -0,0 +1,45 @@
---
title: Heroku with Grav flat-file CMS
date: 2016-06-25
tags:
- dev
- blog
---
> NOTE:
> this is a historical post that i'm importing from my old site.
When I started building a website (sparked by the purchase of my first personal domain name), I started looking into many different solutions to my web development process.
I had already decided that I would use a free dyno on [Heroku](https://heroku.com) for hosting.
As I researched additional solutions, I came upon the world of the PHP CMS (Content Management System, for the uninitiated). Just the sheer number and variety of CMS is [terrifying](https://en.wikipedia.org/wiki/List_of_content_management_systems#PHP).
The free tier for databases in Heroku felt lacking in peace of mind and ease of setup so I focused my search to the realm of the "flat-file" CMS.
I discovered [Grav](https://getgrav.org) purely by chance. Grav claims to be fast and extensible. I was enticed by the flashy admin interface replete with responsive UI and a gorgeous built-in Markdown editor for content creation.
After a bit of [configuration](https://learn.getgrav.org/hosting/paas/heroku), I managed to deploy a Grav instance into a Heroku dyno (a rather annoying affair which involved deploying caches to Heroku and `mod_rewrite` rules in `.htaccess`).
The tricky part came when I brought the [Admin Plugin](https://github.com/getgrav/grav-plugin-admin) into the picture. Without the Admin Plugin, you need to directly change the configurations and add content from the filesystem and then deploy that to the web. You are able, however, to use PHP's built-in development webserver (`php -S localhost:9000`) to test your changes.
Once I got the Admin plugin working (don't forget to clear your cache if you're deploying to Heroku -- or make sure that the cache directory is in your `.gitignore` file), I started making changes to my `.yml` configuration files and writing some content with the built-in Markdown editor. I was very impressed with the Admin interface. It's very modern-feeling, while still being lightning-quick.
Then I needed to make a change that wasn't available from the Admin interface... After the next deploy to Heroku, every change that I had made from within the Admin interface was obliterated. This is the main flaw in hosting a Grav app on Heroku. The ephemeral file system for a dyno on Heroku works just fine, but when the dyno restarts, it is regenerated to the state at the latest build. It's important to note that dynos go down any time you push a new build and at [least once a day](https://devcenter.heroku.com/articles/dynos#restarting).
> Dynos restart when:
+ create a new release by deploying new code
+ change your config vars
+ change your add-ons
+ run heroku restart
I then read more about the [ephemeral filesystem](https://devcenter.heroku.com/articles/dynos#ephemeral-filesystem) of Heroku dynos.
> Each dyno gets its own ephemeral filesystem, with a fresh copy of the most recently deployed code. During the dynos lifetime its running processes can use the filesystem as a temporary scratchpad, but no files that are written are visible to processes in any other dyno and any files written will be discarded the moment the dyno is stopped or restarted. For example, this occurs any time a dyno is replaced due to application deployment and approximately once a day as part of normal dyno management.
This is a useless setup for a Grav application where everything is a file. This may sound a bit harsh, but changes to the live app will be destroyed within a day. This just means that there are two options:
1. Ditch the Admin plugin
2. Use a full LAMP stack locally to make changes to the files from within the Admin interface before deploying to Heroku
I chose to ditch the Admin plugin. Making changes to the project from within the filesystem in [my text editor](https://sublimetext.com/3) was totally acceptable.
Not long after trying to integrate a Grav app within the Silex application that is my website (rather than linking to the Grav app through a subdomain of benhh.com), I gave up Grav for my blog entirely and decided to roll my own [blogging solution](/blog/silex).

View File

@ -0,0 +1,16 @@
---
title: Republican National Convention
date: 2016-07-17
tags:
- politics
- conventions
---
I was asked to chaperone a group of youth journalists with 8-18 Media (a youth journalism program in Marquette that I was once a part of)
__Disclaimer:__ these blog posts represent my opinion!
I plan on writing a post for each day of the RNC journaling my thoughts about the event.
+ [__Day One__]({{< relref "rnc-day-one" >}}) - Benghazi and weaponization of grief
+ [__Day Two__]({{< relref "rnc-day-two" >}}) - Make America Work Again (It's already working with a very low unemployment rate)
+ [__Day Three__]({{< relref "rnc-day-three" >}}) - Make America First Again featuring the second and third place candidates from the Republican primary
+ [__Day Four__]({{< relref "rnc-day-four" >}}) - Make America One Again

11
content/rnc-day-four.md Normal file
View File

@ -0,0 +1,11 @@
---
title: Republican National Convention in Cleveland - Day Four
date: 2016-07-21
tags:
- politics
- conventions
---
__UPDATE__ looks like an article of convention notes by two of our reporters ran in the [Mining Journal](http://www.miningjournal.net/page/content.detail/id/643873/Notes-from-the-convention-hall.html?nav=5192)!
Trump is officially the Republican nominee for President of the United States of America. My first reaction to this news was a feeling of impending doom.

32
content/rnc-day-one.md Normal file
View File

@ -0,0 +1,32 @@
---
title: Republican National Convention in Cleveland - Day One
date: 2016-07-18
tags:
- politics
- conventions
---
Michigan delegates to the Republican National Convention got fired up for New Jersey Governor Chris Christie as he addressed them this morning at their first breakfast meeting. Christie stressed the importance of party unity behind the presumptive nominee, Donald Trump.
However, the enthusiasm for Trump was not as strong as expected. The emphasis was placed on bashing Hillary, rather than promoting a Trump presidency. It makes sense, as it's very hard to promote a candidate who has nothing to offer.
The scene downtown has been peaceful so far. There are, however, huge crowds, but everyone has been respectful aside from some jeers and boos for Hillary.
We have had to take turns in the convention center, as we only have three (of which only two are valid for entering the arena itself) passes for six people.
At the convention center, any mention of Hillary Clinton's name generates a huge boo from the audience.
According to Willie Robertson, of Duck Dynasty fame, Trump is:
+ "a man who knows how to get things done"
+ "a man who says what he means and means what he says"
and will
+ "Make America America again"
It's really showing that the Republican Party had trouble finding people to speak here at the convention. What place do reality TV stars have in our political process?
Overall, it's a disturbing display of the state of our country.
_**UPDATE:** Melania's Plagiarism of Michelle's 2008 speech_ <blockquote class="twitter-video" data-lang="en"><p lang="en" dir="ltr">So that&#39;s pretty blatant, right? <a href="https://t.co/EPnHME7afV">pic.twitter.com/EPnHME7afV</a></p>&mdash; Mike Hearn (@mikehearn) <a href="https://twitter.com/mikehearn/status/755260215021432832">July 19, 2016</a></blockquote>
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
**UPDATE:** Tony Schwartz, ghostwriter of _The Art of the Deal_, spoke out about writing the book. He believes that if Trump wins and gets the nuclear codes, there is an excellent possibility it will lead to the end of civilization. Source: __[NY Times](http://www.nytimes.com/2016/07/19/us/politics/trump-book-tony-schwartz.html)__

36
content/rnc-day-three.md Normal file
View File

@ -0,0 +1,36 @@
---
title: Republican National Convention in Cleveland - Day Three
date: 2016-07-20
tags:
- politics
- conventions
---
Something that has been on my mind all week is the utter lack of minority representation at the convention. Inside the security perimeter, most black people that you see are working here. I check everyone's credentials to see what their role here is. Of all the ones that I've seen, one hand would be enough to count all of the non-white delegates here.
White people are an enormous majority here. Seeing a hispanic or black speaker on stage seems entirely incongruous with the messages and platform of Donald Trump of the Republican party itself. It seems self-defeating for anyone who is not white to be a Republican.
Black guy quotes Martin Luther King Jr.'s _I have a dream_ speech to limited applause from the white delegates on the floor.
This is an excerpt of some notes that I made while watching the convention.
* If you're tired of brokenness elect Donald Trump.
* Conservative leadership is working in States with Republican governors? In Wisconsin? Fact check
* Claims that our economy is in the toilet are unfounded
* The whole premise of America coming back or becoming great again is flawed. What is it coming back from? When was it great? Whom was it great for?
* Apart from race relations, things are relatively good, compared with what Obama inherited when he took office in '08.
* Freedom means no one can tell me what I do with my body. Freedom means no one can tell me whom I marry.
* Education, healthcare, marriage dictated out of Washington by hildawg? Nope, that's what Republicans want to do.
* Brexit mentioned -> cheer -> profound victory for uneducated populace
* Build a wall -> cheer
* Admitting Isis terrorists as refugees? Has that happened before?
* Freedom will lift people out of dependency to the dignity of work? Wat
* Rep founded to defeat slavery? True, but the party has since done a 180...
* Abe Lincoln
* That's our legacy although the media will never share it? Because that's not how the modern Republican party is
* Cruz is all over the place. Didn't endorse Trump. Booed off the stage.
Tonight was Republican Vice Presidential nominee Mike Pence's first appearance on the stage of the convention. He seems fully aware of how boring he is, making a point to mention it to the audience. It's interesting to see him finally joining the Trump train. Especially in contrast to his [endorsement](http://www.indystar.com/story/opinion/2016/05/01/mike-pence-will-vote-ted-cruz/83792658/) of Ted Cruz around the primaries.
Another interesting day at the Republican National Convention.
__Bonus video__
<iframe width="560" height="315" src="https://www.youtube.com/embed/WFjDBvRxcbM" frameborder="0" allowfullscreen></iframe>

26
content/rnc-day-two.md Normal file
View File

@ -0,0 +1,26 @@
---
title: Republican National Convention in Cleveland - Day Two
date: 2016-07-19
tags:
- politics
- conventions
---
Our second day at the RNC began once again at the Michigan Delegation Breakfast Session.
Michigan Speaker of the House Kevin Cotter addressed the delegation with a report on the state of the state. His moderate, compromising stance was all but booed out by the delegation. To me, this highlighted the increasing radicalization of partisan politics. A reasonable politician who understands that things get done through compromise is criticized for not doing enough for the "party."
Despite not attending the RNC itself, Ohio Governor John Kasich addressed the MI delegation immediately following Speaker Cotter at the breakfast. As I expected, he didn't mention the white elephant in the room: Trump. Trump and other party Republicans have called Kasich out for his absence from the Convention proceedings at the Quicken Loans Arena. Many delegates expected him to endorse Trump, but were left unsatisfied.
Delegates who were originally sent to represent Kasich were left confused, expecting him to give some sort of indication (that would have been made clear by some sort of endorsement). Once Kasich left, it seemed that these delegates would end up falling into party lines by voting Trump.
After returning to edit some stories and get lunch, we drove to an event that had been recommended to us by a local contact. [The American Dream](https://cityclub.org/events/the-american-dream-a-symposium-at-the-intersection-of-art-and-politics) included a 4000 pound ice sculpture of _"The American Dream"_ that was left outside to melt, a metaphor for the idea of the American Dream.
A panel of local artists and coordinators discussed the potential of art to be a powerful force for change. It was refreshing to hear some reasonable voices and empowering to hear about the experiences that these people have had in working together to produce a series of documentaries called [_The Fixers_](http://www.thefixerscleveland.com/)
Bonus video:
<iframe width="560" height="315" src="https://www.youtube.com/embed/ahChgL85VF8" frameborder="0" allowfullscreen></iframe>
__UPDATE:__ Looks like Donald is now officially the Republican nominee... the votes are in.

36
content/silex.md Normal file
View File

@ -0,0 +1,36 @@
---
title: Why I chose Silex for this website
date: 2016-06-29
tags:
- dev
- blog
---
> UPDATE:
> this is a very old post that i'm importing from my old site...
> i'm including it for historical purposes
> here's the [deployed site](https://benhh.bhh.sh)
> and the [source for it](https://github.com/benharri/benhh.com)
### This is an introduction to my choice of framework in building this website.
#### Several options I considered for my website:
+ [Django](https://djangoproject.com/)
* Django's opinionated Model model with its strong database ties seemed a bit much for a relatively static site
* It's huge and unnecessarily complicated for a simple website
* It would be a great learning experience in Python
+ [Vanilla PHP](https://php.net)
* I have a lot of experience in vanilla PHP at my internship at [Northern Michigan University](http://nmu.edu) working in the Information Services department where I develop web applications for internal use.
* I often find myself frustrated with PHP's quirkiness and wouldn't learn new material if I used this for my personal website.
+ [Silex](https://silex.sensiolabs.com)
* This is a micro-framework built using components of the much larger [Symfony](https://symfony.com) framework.
* I discovered Silex in [Heroku's PHP deployment guide](https://devcenter.heroku.com/articles/getting-started-with-php) where I noticed that it was small enough to not draw unneeded overhead and extensible enough for my website to grow as it needed.
I opted to go with Silex. The source code is available [here](https://github.com/benharri/benhh.com) for your perusal.
I have gone through many iterations of this site. The first version was simply a clone of the [homepage](http://euclid.nmu.edu/~benharri/) that I have on my university's computer science department server. This wasn't a very useful homepage as many of the projects that I wanted to show in a portfolio were tied to a database on that server.
I eventually moved towards a one-page style layout ([in this commit](https://github.com/benharri/benhh.com/commit/974e12e85a9ab872facf0f4a238337b2e2d216a3)) where the links in the navbar would scroll the page to pre-defined regions. I then ditched the old multipage layout and at this point I discovered [Grav](https://getgrav.org). After difficulties integrating Grav within my app (read more [here](/blog/grav-on-heroku)), I decided to roll my own blogging solution modeled after Grav's markdown content system.
I included a YAML Front Matter + Markdown Parser and used that to define the metadata for a [blogpost](https://github.com/benharri/benhh.com/blob/master/app/controllers/Blog.php).
There is still much to do (post sort order, paging, tagging, etc), but I appreciate the experience that I have gained in building this blogging system.

View File

@ -0,0 +1,24 @@
---
title: The Party of Lincoln
date: 2016-07-21
tags:
- politics
- conventions
---
Something that struck me as absolutely outrageous (_more_ than other things that I've seen this week) was the connection of the roots of the Republican party to the modern Republican party.
While it never hurts to be proud of where the party comes from, it is completely unreasonable to claim that the modern-day party stands for the same things it did when it was founded.
The Republican party was founded in 1854 on an anti-slavery platform, where it filled in the power gap in the north left by the collapsed Whig party. It saw strong support in the north of the US, where Republicans fought to end slavery. Abraham Lincoln was elected as the first Republican president in 1860.
When Lincoln ended slavery with the Emancipation Proclamation, Democrats in the south resisted, sometimes violently, and sometimes with laws, known as Jim Crow laws.
Eventually, northern Republicans made rich by civil war industry grew tired of supporting the rights of freed slaves in the south. These rich white men became party officials and did not want to give up any of their power. The aimed to protect their own interests. In this manner, the Republican party became the party of big business.
The parties as we know them today were solidified in the '80s.
It's entirely inaccurate to claim that the Republican party of today resembles in any way the Republican party at the time of its founding.
I was inspired to write this article by mention of this idea at the convention, as well as this Vox video.
<iframe width="560" height="315" src="https://www.youtube.com/embed/s8VOM8ET1WU" frameborder="0" allowfullscreen></iframe>

20
content/welcome.md Normal file
View File

@ -0,0 +1,20 @@
---
title: Welcome To My Blog
date: 2016-06-24
tags:
- blog
---
This is my first post.
I'm Ben Harris. I study computer science at Northern Michigan University.
I'll be writing about some of the experiences I've had in software and in other areas of my life.
Some of my hobbies include:
+ writing software
+ biking
+ traveling
+ ultimate frisbee
Thanks for checking out my blog!