When administrating a server, I prefer to focus on meaningful log messages. If too many alerts are coming through, the important messages can be lost in the struggle. On one of our servers, there was a high volume of lfd perm block notifications. Email notifications similar to:
Resolution
This is how to disable these messages within WHM/Cpanel.
Login to WHM
Search for/navigation to: Plugins > ConfigServer Security & Firewall
In continuation of last year’s post, I present my year in review.
Open Source Projects Published
go-json-rest-middleware-formjson - This package provides a Go-Json-Rest middleware useful for converting request data with the content type “application/x-www-form-urlencoded” to “application/json”
Selected as one of 5 companies to participate in Techstar’s Startup Next 2016 Austin program. Great experience and connections, can’t say enough good things about the program or the organization.
New side projects in the works
DoorMatX - Very excited to be collaborating with Daniel Johnston on getting his iconic “Hi How Are You” artwork onto doormats all over the world.
American Gods (American Gods, #1) by Gaiman, Neil - Unique tale intertwined with powerful critique on our changing culture of worship.
Book of Numbers: A Novel by Cohen, Joshua - Postmodern fiction, but more accessible than David Foster Wallace, especially with the focus on Silicon Valley Culture.
Tarzan of the Apes (Tarzan, #1) by Burroughs, Edgar Rice - Timelessly crafted tale with every angle well thought out and explained.
The Ascent of Money: A Financial History of the World by Ferguson, Niall - Intriguing history of money and finance and its powerful impact on the course of human history.
The Beginning of Infinity: Explanations That Transform the World by Deutsch, David - Thought provoking combination of mathematics, physics, and philosophy.
TV Series Watched
Walking Dead - Still. Love dystopian enough to stick with it, but didn’t love the season.
Game of Thrones - Still. Top 5 series of all time.
Daredevil - Not historically a comic book fan, but NetFlix’s superhero series are drawing me in with their character depth and production value.
Jessica Jones - Thought I was a comic book series convert, but didn’t love this one. Weaker character development and storytelling.
Sons of Anarchy - Soap opera for those who love violence. Over the course of the entire series, oscillated between intrigue and disgust. Stuck with it to the end, but not highly recommended.
Courses Taken
As Human Planet took up more time, continued education took a hit. Hope to work in more in the coming year.
Programming Languages/Frameworks/Technologies/etc. used
Golang
React
Angular
GraphQL
Relay
PostgreSQL
PHP
MySQL
Drupal
Wordpress
Python
Ruby
Jekyll
JavaScript
jQuery
SASS
CSS
HTML
AWS [Amazon Web Services]
S3
EC2
CloudFront
Route 53
SNS
Heroku
Azure
Websockets
Review Plans for 2016
Implement daily planning and time management
Grade: C-
Went through streaks, but didn’t settle into a nice rhythm. Definitely see better flow when doing daily planning, but when the tasks start piling up, I tend to grind instead of plan.
25+ Blog posts (setting a more realistic goal this time)
Grade: F+
I posted, but was once again considerably short of my goal.
Secure angel-funding for Human Planet
Grade: D-
Schedule was pushed back a bit, just now hitting the road trying to raise a seed round. Did manage to make some great progress launching iPhone app, taking part in Techstar’s Startup Next Program, and launching our beta.
Beta launch of Human Planet
Grade: A
By the skin of our teeth, but we launched with Kome Sushi in December.
Plans for 2017
Implement daily planning and time management (carry over)
12+ Blog posts (for real setting a more realistic goal this time)
Secure seed-funding for Human Planet (carry over)
Work out at least 3 times per week. Fitness has taken a back seat to work this year, and it’s time to right the ship.
In continuation of last year’s reading list, here is my third-annual reading list. Thanks to goodreads, making this list was much easier this time! As usual, there’s an eclectic mix of genres.
In alphabetical order by title…
A Game of Thrones (A Song of Ice and Fire, #1) by Martin, George R.R.
A Perfect Spy by le Carré, John
American Gods (American Gods, #1) by Gaiman, Neil *
April 4, 1968: Martin Luther King, Jr.’s Death and How It Changed America by Dyson, Michael Eric
Book of Numbers: A Novel by Cohen, Joshua
Childhood’s End by Clarke, Arthur C.
Crossing to Safety by Stegner, Wallace
Flow by Csikszentmihalyi, Mihaly
Growth Hacker Marketing: A Primer on the Future of PR, Marketing, and Advertising by Holiday, Ryan *
Ham on Rye by Bukowski, Charles
I Know Why the Caged Bird Sings by Angelou, Maya
In the Heart of the Sea: The Tragedy of the Whaleship Essex by Philbrick, Nathaniel *
John Adams by McCullough, David
Leviathan Wakes (Expanse, #1) by Corey, James S.A. *
Losing My Virginity: How I’ve Survived, Had Fun, and Made a Fortune Doing Business My Way by Branson, Richard
Mindfulness in Plain English by Gunaratana, Henepola
Missoula: Rape and the Justice System in a College Town by Krakauer, Jon *
Nine Stories by Salinger, J.D.
Not My Father’s Son by Cumming, Alan
Shakespeare Saved My Life: Ten Years in Solitary with the Bard by Bates, Laura
Sick in the Head: Conversations About Life and Comedy by Apatow, Judd
Steve Jobs: 50 Life and Business Lessons from Steve Jobs by Ilian, George
Tarzan of the Apes (Tarzan, #1) by Burroughs, Edgar Rice
Team of Rivals: The Political Genius of Abraham Lincoln by Goodwin, Doris Kearns
The Art of Living: The Classical Manual on Virtue, Happiness and Effectiveness by Lebell, Sharon
The Ascent of Money: A Financial History of the World by Ferguson, Niall
The Atlantis World (The Origin Mystery, #3) by Riddle, A.G. *
The Beginning of Infinity: Explanations That Transform the World by Deutsch, David
The Bell Tolls for No One by Bukowski, Charles
The Cryptographer’s Way by III, Dr. Bradford Hardie
The End of Average: How We Succeed in a World That Values Sameness by Rose, Todd
The Good Earth by Buck, Pearl S.
The Life and Times of the Thunderbolt Kid by Bryson, Bill
The Man in the High Castle by Dick, Philip K.
The Miracle of Mindfulness: An Introduction to the Practice of Meditation by Nhất Hạnh, Thích
The New New Thing: A Silicon Valley Story by Lewis, Michael
The Snowball: Warren Buffett and the Business of Life by Schroeder, Alice
Then We Came to the End by Ferris, Joshua
Transcendence: Healing and Transformation Through Transcendental Meditation by Rosenthal, Norman E. *
Twenty Thousand Leagues Under the Sea by Verne, Jules
Written in Fire (Brilliance Saga, #3) by Sakey, Marcus
Yes Please by Poehler, Amy
Your Heart Is a Muscle the Size of a Fist by Yapa, Sunil *
github.com/graphql-go/graphql and github.com/graphql-go/relay provide a
great starting point for creating your own Relay-compliant GraphQL server with Go. Authorization, however, is left up completely to the developer. Here
is how we implemented a /login endpoint and passed the resulting context to the GraphQL Handler.
We’ll leave the handling of these context values within GraphQL to another post…
Code
Explanation
The loginFunc() function at /login receives the posted request and extracts a username and password from it. ConfirmLogin() is not outlined above,
but is easy enough to implement. In our scenario, we validate the login against our database and return the user or an error.
If the login is valid, we create and return the JWT with our encoded custom claim values (UserID & IsAdmin).
When a request is made to the graphql handler, the requireAuth() middleware parses the JWT, and if valid, passes the (UserID & IsAdmin) variables via context.
The passing of context to GraphQL is explained in this post.
Go’s “net/http” package provides great out of the box server capabilites with extensible middleware. In order to leverage http middleware in combination with the “github.com/graphql-go/graphql” package, we needed to pass the http.Request.Context() to the graphql handler. Here is how we did so:
Code
Explanation
The AddContext() function is taking the standard http.Request.Context() and supplementing it with our additonal “authContext” map. This Context is then passed to the graphqlHandlerFunc where we setup a new GraphQL instance with the Context initialized to http.Request.Context().
This way, we can access these values within our GraphQL objects.