k

Advice for Caregivers: Walking in the Shoes of a Loved One with TBI and/or PTSD

Adam offers advice to caregivers of a loved one with TBI and/or PTSD — from simply trying to see how that person's life has changed to helping him get involved in confidence-boosting activities.




k

At College, Move Beyond the Stigma of Asking for Help After a Brain Injury

If extra time on a test or memory aids can make life easier during college, why not use them? Adam talks about moving past the "stigma" of using disability services and getting the help you need to succeed in college.




k

BrainLine Military Blogger Adam Anicich Says Thank You and Goodbye for Now

Adam thanks you — his blog viewers and supporters — and encourages you to continue the discussion and awareness raising about TBI and PTSD; the battle does not stop here.




k

3 Ways to Optimise Blog Content so it Ranks Well on Google

When it comes to your blog’s position within search engine results, there’s far more than just sheer luck at play. Search Engine Optimisation is a skill that any content creator – professional or amateur – should develop in order to make their content as discoverable as possible. It involves making certain tweaks to your blog […]

Original post: 3 Ways to Optimise Blog Content so it Ranks Well on Google

The post 3 Ways to Optimise Blog Content so it Ranks Well on Google appeared first on Daily Blog Tips.




k

Best Alexa Skills That Will Actually Surprise You

Technology has changed the way we live. A few decades back, we couldn’t even imagine making a video call to a person sitting in another corner of the world. With every technological advancement, mankind is treading towards greater development. From smart gadgets to machines, every invention has leveraged the human lifestyle.  There’s no doubt in […]

Original post: Best Alexa Skills That Will Actually Surprise You

The post Best Alexa Skills That Will Actually Surprise You appeared first on Daily Blog Tips.





k

Every Day A Post of WordPress Tips and Tricks until Christmas!

The time has come and our loyal reader know already our traditional Advents Calendar. For the people who don’t know, […]




k

New hooks in WordPress 3.8

WordPress 3.8 introduced one new action and five new filters: automatic_updates_complete Action triggered after all automatic updates have run. (wp-admin/includes/class-wp-upgrader.php) […]




k

Create your own bulk actions

Including version 4.6 it was quite difficult to add custom bulk actions to the WordPress admin pages. In version 4.7 […]




k

Website Inspiration: Ruben Kuipers

Comprehensive One Page portfolio for freelancer Ruben Kuipers. There are a few noteworthy elements here; the tech/design skills switch, the integration of the two (quality) testimonials within project thumbs and how the dark mode color scheme switcher changes the image of him – nice touch! Full Review




k

Article: 25 Beautifully Dark-Schemed Landing Pages for Inspiration

There is something instantly remarkable about a website with a strong, dark color scheme.





k

Get to Know the Person with TBI




k

My PTSD can be a weight. But in this pandemic, it feels like a superpower.

For the first time, it seems, the entire world knows what it’s like to live inside my head.






k

Nature Offers Solutions to Water Woes and Flood Risks

By David Suzuki David Suzuki Foundation When the Aztecs founded Tenochtitlán in 1325, they built it on a large island on Lake Texcoco. Its eventual 200,000-plus inhabitants relied on canals, levees, dikes, floating gardens, aqueducts and bridges for defence, transportation, … Continue reading




k

Electric Cars and Surging Solar Spell Market Doom for Fossil Fuels

By Jessica Corbett Common Dreams Analyses show how demand for electric vehicles and rapidly falling renewable energy prices could take down oil and gas industry As an increasing number of nations make plans for banning gas and diesel vehicles within … Continue reading



  • Business & Economy

k

Children’s Exposure to Secondhand Smoke May Be Vastly Underestimated by Parents

Tel Aviv University Press Release Smoking parents misperceive where and when their kids are exposed to cigarette smoke, Tel Aviv University researchers say Four out of 10 children in the US are exposed to secondhand smoke, according to the American … Continue reading




k

You Know Clean Air is Good for Your Health. It’s Good for the Economy, Too.

By Rachel Cernansky Ensia When the Clean Air Act of 1970 became law, members of the business community in the United States responded with opposition. Such regulations are a drag on growth, some economists say, for individual businesses and for … Continue reading




k

McDonald's Workers in Denmark Pity Us

Nicholas Kristof: Before the coronavirus pandemic, I crept behind [expletive] Danish lines to explore: How scary is Denmark? How horrifying would it be if the United States took a step or two in the direction of Denmark? Would America lose its edge, productivity and innovation, or would it gain well-being, fairness and happiness?




k

Video Shows a Man Screaming 'Fake Pandemic' at a Florida Officer

A nearly two-minute, profanity-laced tirade at a code officer at a Miami Beach grocery store is the latest example of mounting tensions in the US over wearing masks to stem the spread of the coronavirus.




k

Federal Watchdog Backs Reinstating Ousted Vaccine Expert

A federal watchdog is recommending that ousted vaccine expert Rick Bright be reinstated while it investigates whether the Trump administration retaliated against his whistleblower complaints when it removed him from a key post overseeing the coronavirus response, Bright's lawyers said Friday.




k

Mysterious Sharks Dance Away Bethel's COVID-19 Blues

A couple of mysterious sharks have caught the fancy of the town. Maybe it's the cabin fever finally setting in, or perhaps this is what happens when you go too long without washing your mask, but Bethelites are going wild for two people in inflatable shark suits who pop up randomly around town.




k

More Than 1,000 Workers at Tyson Plant Have Coronavirus

More than 1,000 workers at the Tyson Foods plant in Waterloo have tested positive for the coronavirus, a county public health leader said Thursday -- more than double the number Gov. Kim Reynolds had said were infected the day before.




k

Scientists Obtain 'lucky' Image of Jupiter

Astronomers have produced a remarkable new image of Jupiter, tracing the glowing regions of warmth that lurk beneath the gas giant's cloud tops. The picture was captured in infared by the Gemini North Telescope in Hawaii, and is one of the sharpest observations of the planet ever made from the ground.




k

Everything I Know In One Place

It was surreal to sit down at the mic and record this show after spending the last few years (5 a.m. mornings, late, late nights, and many long weekends hunkered down) writing a book that I’m proud and beyond excited to share with YOU and the world.  It’s called CREATIVE CALLING and it’s officially available for pre-order TODAY! In this episode, you get the little sneak peek at the book (yes, I read a little from it) and a little background on why I needed to write it.  After all, life isn’t about “finding” fulfillment and success – it’s about creating it. Creativity is a force inside every person that, when unleashed, transforms our lives and delivers vitality to everything we do. Establishing a creative practice is therefore our most valuable and urgent task – as important to our well-being as exercise or nutrition. The good news? Creativity isn’t a skill—it’s a habit available to everyone:  beginners and lifelong creators, entrepreneurs to executives, astronauts to zookeepers, and everyone in between. It’s only through small, daily actions that we can supercharge our innate creativity and (re-)discover our personal power in life. Everything you need is inside you right now. Whether your ambition is a creative career, completing a creative […]

The post Everything I Know In One Place appeared first on Chase Jarvis Photography.




k

The Introvert Advantage with Beth Comstock

Even though I’m an extrovert, I have a feeling the future favors the introvert. Beth Comstock was at the CreativeLive studios in Seattle and I could not help but snag her for a quick moment to pick her brain on one of the most popular topics on my channel — navigating an extroverted world as an introvert. As a self-described introvert, Beth knows what it’s like to find elevate your strengths and have the courage to defend your creative ideas. Beth was named one of the most powerful women in business. After leaving a 27 year career at GE as their Chief Marketing Officer and Vice Chair, she decided to got a completely different direction to focus on new areas such as writing, art, exploration, and discovery. In this episode, Beth shares her advice to embrace your nature, and bring those strengths to any client, team, or situation. Enjoy! If you dig the show, please give a shout out to Beth on social and let her know. ???? FOLLOW BETH: twitter | instagram | website Listen to the Podcast  Subscribe   This podcast is brought to you by CreativeLive. CreativeLive is the world’s largest hub for online creative education in […]

The post The Introvert Advantage with Beth Comstock appeared first on Chase Jarvis Photography.




k

A [big] new challenge—the story behind the Creative Calling book cover

When it was time to think about the cover – the whole design package – for my NEW BOOK, Creative Calling, I knew I wanted it to be something different. After all…see if you follow me here… it’s just wrong to make a book about creativity with just any old trend, cliche book cover.  Instead, the package needed to embody the ideas within. So when we approached this design challenge of a hard bound book – it had to be meaningful, beautiful, AND stand out in a sea of other books on the shelf.  No small task… And consider this:  you know that this isn’t just a nice story about the book cover.  This is a metaphor for any creative challenge.  Like every episode of podcast is full of practical advice….this is the real life story of ups and downs on this process…on how we struggled to overcame the challenge front of us… with costs, design options, time, publisher feedback, and other real-life constraints.  In short of EVERY CREATIVE PROCESS.  I’ve included 2 live-recorded phone calls with the designers on the project, Lou and Vasco, so you get their take on the creation process, challenges, the concepts behind what we set out to […]

The post A [big] new challenge—the story behind the Creative Calling book cover appeared first on Chase Jarvis Photography.




k

Independence and the Art of Timeless Work with Zoë Keating

A cellist since the age of eight, Zoë Keating pursued electronic music and contemporary composition as part of her Liberal Arts studies at Sarah Lawrence College in New York. I came across her music almost 10 years ago and love it so much I reached out to see if she would be interested on being on the show. Not only did she respond, she left us reeling from her incredible live performance and chat on art + entrepreneurship. Now she’s back on tour with her latest album Snowmelt. In this episode, we go deep into personal growth, dealing with incredible loss, balancing parenthood and career, and landscape for independent artists. Enjoy! FOLLOW ZOË: instagram | twitter | website Listen to the Podcast Subscribe   Watch the Episode  This podcast is brought to you by CreativeLive. CreativeLive is the world’s largest hub for online creative education in photo/video, art/design, music/audio, craft/maker, money/life and the ability to make a living in any of those disciplines. They are high quality, highly curated classes taught by the world’s top experts — Pulitzer, Oscar, Grammy Award winners, New York Times best selling authors and the best entrepreneurs of our times.

The post Independence and the Art of Timeless Work with Zoë Keating appeared first on Chase Jarvis Photography.




k

Imagine What’s Possible – On Stage /w Humans of New York Creator Brandon Stanton

My book Creative Calling is out! Thanks for all your love, support, and help getting it out into the world. We kicked off celebrations in Seattle with over 700 people in attendance to talk about Creativity with my good buddy, Humans of New York creator, Brandon Stanton. I recorded the session for you. Hope you enjoy! FOLLOW HUMANS OF NEW YORK: instagram | twitter | website Listen to the Podcast Subscribe   This podcast is brought to you by CreativeLive. CreativeLive is the world’s largest hub for online creative education in photo/video, art/design, music/audio, craft/maker, money/life and the ability to make a living in any of those disciplines. They are high quality, highly curated classes taught by the world’s top experts — Pulitzer, Oscar, Grammy Award winners, New York Times best selling authors and the best entrepreneurs of our times.

The post Imagine What’s Possible – On Stage /w Humans of New York Creator Brandon Stanton appeared first on Chase Jarvis Photography.




k

How To Get UN-STUCK From Anything in Life That’s Got You Down [with Lewis Howes]

Ever felt STUCK with something in your life? Blocked, like you can’t get past this mental state, this hurdle, this creative block, this bad habit, this… Wait a minute. Why am I even asking that question? Of course you’ve been stuck before. We’ve literally ALL been stuck before. And by extension we all know how much it sucks to be in this state of mind. AND – on the flipside – how amazing it is when you can reclaim your life and get back to the things you want to be thinking, doing, and becoming. I’m obsessed with overcoming the mental blockers that try to keep me down – and I think it’s been a big piece of my personal success. Which is why I thought this little nugget might help. ENTER: Lewis Howes. My good friend Lewis Howes was in the studio shooting his newest CreativeLive course last week and I was able to snag him for a few minutes to chat about his new book and his amazingly simple, yet powerful process for reclaiming our lives and live our biggest dreams. In this episode, Lewis shares a powerful experience from his life and how- on reflection – it helped […]

The post How To Get UN-STUCK From Anything in Life That’s Got You Down [with Lewis Howes] appeared first on Chase Jarvis Photography.




k

Redefine Creativity – A conversation with Kevin Rose

Today I’m sitting down with investor, serial entrepreneur and all around good human, Kevin Rose. If you’re a long timer listener, you might remember Kevin was part of 30 Days of Genius. Now the tables are turned and I’m in the hot seat as a guest on his podcast, the Kevin Rose Show. Of course, it’s always fun sitting down with one of my long time homies to unpack some of my favorite topics, including: How to build your creative muscle and why it’s becoming more important Standing out and why you’re uniquely qualified. Forgetting the “shoulds” is a must do to uncork our richest lives and much more… Big shoutout to Kevin for having me on the show … and if you haven’t already, be sure to check out his podcast The Kevin Rose Show anywhere you listen to podcasts. Enjoy! FOLLOW KEVIN: instagram | twitter | website Listen to the Podcast Subscribe   This podcast is brought to you by CreativeLive. CreativeLive is the world’s largest hub for online creative education in photo/video, art/design, music/audio, craft/maker, money/life and the ability to make a living in any of those disciplines. They are high quality, highly curated classes taught by the world’s top […]

The post Redefine Creativity – A conversation with Kevin Rose appeared first on Chase Jarvis Photography.




k

Dan Pink: If You Believe In It. Share It.

Dan Pink is a bestselling author and was the host & co-executive producer of “Crowd Control”, a television series about human behavior on National Geographic. He’s appeared frequently on NPR, PBS, ABC, CNN, and other TV/radio networks worldwide. His provocative books include Drive, A Whole New Mind, To Sell is Human, and his latest book, When: The Scientific Secrets of Perfect Timing. I love Dan’s books. He’s a ruthlessly practical thinker and in this episode he doesn’t hold back. We get into: How to see trends or unlikely connections across by absorbing and learning from a wide variety of sources, whether that’s audio programs, books, documentaries, or episodes of Silicon Valley. Using lists to track influences, sources, and even random ideas or curiosities to spark new ideas Selling isn’t a dirty word, it’s required to get our ideas out there. If we believe in our work, we have a moral obligation to share it. and so much more… Enjoy! FOLLOW DAN: instagram | twitter | website Listen to the Podcast Subscribe   This podcast is brought to you by CreativeLive. CreativeLive is the world’s largest hub for online creative education in photo/video, art/design, music/audio, craft/maker, money/life and the ability to make […]

The post Dan Pink: If You Believe In It. Share It. appeared first on Chase Jarvis Photography.




k

Chris Burkard: Say Yes to What You Want

Today’s guest is one many of you have been asking for oh-so-long. He’s one of the top travel, outdoor, and landscape photographers in the world, bringing us to some of the most untamed and powerful landscapes in the pursuit of powerful stories, hidden surf, and a good adventure. Of course in this episode we get into his new book, At Glacier’s End, but we also get into some meaty topics such as: the power of exploring personal projects and how it can shape new opportunities the sacrifice that comes as pursing your passions personal growth and how it evolves over time and so much more Enjoy! FOLLOW CHRIS: instagram | twitter | website Listen to the Podcast Subscribe   Watch the Episode  This podcast is brought to you by CreativeLive. CreativeLive is the world’s largest hub for online creative education in photo/video, art/design, music/audio, craft/maker, money/life and the ability to make a living in any of those disciplines. They are high quality, highly curated classes taught by the world’s top experts — Pulitzer, Oscar, Grammy Award winners, New York Times best selling authors and the best entrepreneurs of our times.

The post Chris Burkard: Say Yes to What You Want appeared first on Chase Jarvis Photography.




k

Rethink Impossible with Colin O’Brady

Colin O’Brady is a world record holding explorer and one of the world’s top endurance athletes. Fresh out of college, Colin had a vast world of possibility in front of him when a tragic accident left him hospitalized. Unsure if he’d ever walk again, his injuries covered nearly 25% of his body, primarily damaging his legs and feet. Despite the odds, his mother encouraged him to dream big and he dared to set a seemingly impossible goal that set him on a path to rethink what’s possible. Fast forward to today, and Colin’s list of achievements is staggering. In this episode, we get into many of his harrowing adventures, including his solo, unsupported, unassisted crossing of Antartica. Even if you’re not a professional athlete or have any ambition to break world records, his story will resonate. We all need courage, a strong mindset, and pure grit to overcome obstacles, pursue big dreams, and do the seemingly impossible. A few highlights from our conversation: 1000 NOs paves the way to YES. How failure is only helping us forge and prepare us for the thing we are reaching for. The longest journey is 6 inches between your ears. Colin shares how he discovered mindset […]

The post Rethink Impossible with Colin O’Brady appeared first on Chase Jarvis Photography.




k

Workplace Revolution with Amy Nelson

Amy Nelson is the founder and CEO of The Riveter. If you’re not familiar with The Riveter, it’s a modern day union of women and their allies. It’s a community, a workspace and resource that supports women in building business and careers. The Riveter has locations all throughout the US and is growing rapidly. I cannot wait for you to hear this story. Amy Nelson practiced corporate litigation for over a decade in New York City and Seattle and worked in politics under several presidents. But it wasn’t until she was a mother that she started noticing something. Conversations no longer were about her career, but how motherhood would impact her career. Why was it not possible to “have it all”: be the best lawyer, the best wife, and mother? Looking for inspiration, she discovered a telling statistic: 43% of highly trained professional women “off-ramp” after having kids. It was then an idea started to form. In this episode we explore: How a bold concept can go from idea to reality. How Amy raised money and grew a national company in 2.5 years Being a vulnerable leader + the emotional journey of exploring and building something new How can we all […]

The post Workplace Revolution with Amy Nelson appeared first on Chase Jarvis Photography.




k

10 Breaths Back to Love with Kamal Ravikant

Kamal Ravikant was in a dark place. After four years of pouring his heart, soul, and money into his tech startup, it blew up. He lost everything – including himself. In a moment of desperation, a vow deep within came to the surface: to love himself. Though it was a bit of a foreign concept, he set out to undo the misery in his head through the lens of love. The practice Kamal formed became the self-published book: Love Yourself Like Your Life Depends on It. It sold over a half a million copies and is now newly expanded. In our conversation Kamal shares his ruthlessly practical way he unwound the negative thoughts and more importantly, made it last. In our conversation we explore: Mindset as a practice, including the 7 minute meditation Kamal uses to break old mental patterns Kamal shares his advice in getting unstuck, including giving yourself time to simply live Our brain is a monkey gone bananas. Pain, joy, loneliness, love are a universal part of the human condition such that no matter our individual circumstance we are all trying to tame it. and much more… Enjoy! FOLLOW KAMAL: instagram | twitter | website Listen to the Podcast […]

The post 10 Breaths Back to Love with Kamal Ravikant appeared first on Chase Jarvis Photography.




k

The Code of the Extraordinary Mind with Vishen Lakhiani

Join me + bestselling author Vishen Lakhiani LIVE Tuesday April 7 at 6:30pm PST. Vishen Lakhiani is one of today’s most influential minds in the fields of education and human consciousness. He is the founder of Mindvalley University and its 2 million-strong student base and creator of the Quests learning platform: a next-generation method of online learning, which attains an unheard-of 60% completion rate on courses, in an industry where 8% is average. Vishen’s book, The Code of the Extraordinary Mind, made the New York Times Business Best Sellers List, and hit the coveted #1 spot on Amazon five times in 2017. Enjoy! FOLLOW VISHEN: instagram | facebook | website Listen to the Podcast coming soon … Subscribe   This podcast is brought to you by CreativeLive. CreativeLive is the world’s largest hub for online creative education in photo/video, art/design, music/audio, craft/maker, money/life and the ability to make a living in any of those disciplines. They are high quality, highly curated classes taught by the world’s top experts — Pulitzer, Oscar, Grammy Award winners, New York Times best selling authors and the best entrepreneurs of our times.

The post The Code of the Extraordinary Mind with Vishen Lakhiani appeared first on Chase Jarvis Photography.




k

Create the Change You Seek with Jonah Berger

Jonah Berger is a marketing professor at the Wharton School at the University of Pennsylvania and internationally bestselling author of Contagious, Invisible Influence, and The Catalyst. Dr. Berger is a world-renowned expert on change, word of mouth, influence, consumer behavior, and how products, ideas, and behaviors catch on. He has published over 50 articles in top‐tier academic journals, teaches Wharton’s highest rated online course, and popular outlets like The New York Times and Harvard Business Review often cover his work. He’s keynoted hundred of events, and often consults for organizations like Google, Apple, Nike, and the Gates Foundation. Enjoy! FOLLOW JONAH: instagram | twitter | website Listen to the Podcast Subscribe   Watch the Episode This podcast is brought to you by CreativeLive. CreativeLive is the world’s largest hub for online creative education in photo/video, art/design, music/audio, craft/maker, money/life and the ability to make a living in any of those disciplines. They are high quality, highly curated classes taught by the world’s top experts — Pulitzer, Oscar, Grammy Award winners, New York Times best selling authors and the best entrepreneurs of our times.

The post Create the Change You Seek with Jonah Berger appeared first on Chase Jarvis Photography.




k

Make It Til You Make It with Owen Smith

If you happened to come across a Youtube video I put out not too long ago featuring Owen Smith, you’ll know the backstory how we connected for this episode of the Chase Jarvis LIVE show. Of course, we hoped to meet in person, but for now we’re coming LIVE to you from our living rooms. Owen Smith is a comedian, actor, writer, and the creator of a new YouTube show: Notebooks. He has performed stand-up on Conan, Colbert and is a regular at the Comedy Store Hollywood and Comedy Cellar in New York. He’s written for shows such as ABC’s Black•ish, Survivor’s Remorse (Starz), The Arsenio Hall Show, The ESPY’s (on ESPN with Drake and ABC with Joel McHale), The Guy’s Choice Awards, Whitney(NBC), Deon Cole’s Black Box (TBS), Are We There Yet (TBS), and Everybody Hates Chris. In this episode, we explore Owen’s Notebook project (so good!) and go deep into growing and developing as an artist, putting work into the world, learning to trust your instincts, finding the right time/place for your ideas, and so much more. Definitely check out his new show Notebooks. So relatable and funny for any creator. Enjoy! FOLLOW OWEN: instagram | twitter | […]

The post Make It Til You Make It with Owen Smith appeared first on Chase Jarvis Photography.




k

Hope in a Sea of Endless Calamity with Mark Manson

Today on the show, I’m chatting with New York Times bestselling author Mark Manson. He is the #1 New York Times Bestselling author of Everything is F*cked and The Subtle Art of Not Giving a F*ck, the mega-bestseller that reached #1 in fourteen different countries. Mark also runs one of the largest personal growth websites in the world, MarkManson.net, a blog with more than two million monthly readers and half a million subscribers, making him one of the largest and most successful independent publishers in the world. In this episode, we take a deep dive into the creative process. How to spend your time when you’re trying get comfortable with being uncomfortable. Mark helps bring into focus the up-side that this moment has created for us while also sharing some of the tactics he while quarantined. Enjoy! FOLLOW MARK: instagram | twitter | website Listen to the Podcast Subscribe   This podcast is brought to you by CreativeLive. CreativeLive is the world’s largest hub for online creative education in photo/video, art/design, music/audio, craft/maker, money/life and the ability to make a living in any of those disciplines. They are high quality, highly curated classes taught by the world’s top experts — Pulitzer, Oscar, […]

The post Hope in a Sea of Endless Calamity with Mark Manson appeared first on Chase Jarvis Photography.




k

Markdown Comes Alive! Part 1, Basic Editor

In my last post, I covered what LiveView is at a high level. In this series, we’re going to dive deeper and implement a LiveView powered Markdown editor called Frampton. This series assumes you have some familiarity with Phoenix and Elixir, including having them set up locally. Check out Elizabeth’s three-part series on getting started with Phoenix for a refresher.

This series has a companion repository published on GitHub. Get started by cloning it down and switching to the starter branch. You can see the completed application on master. Our goal today is to make a Markdown editor, which allows a user to enter Markdown text on a page and see it rendered as HTML next to it in real-time. We’ll make use of LiveView for the interaction and the Earmark package for rendering Markdown. The starter branch provides some styles and installs LiveView.

Rendering Markdown

Let’s set aside the LiveView portion and start with our data structures and the functions that operate on them. To begin, a Post will have a body, which holds the rendered HTML string, and title. A string of markdown can be turned into HTML by calling Post.render(post, markdown). I think that just about covers it!

First, let’s define our struct in lib/frampton/post.ex:

defmodule Frampton.Post do
  defstruct body: "", title: ""

  def render(%__MODULE{} = post, markdown) do
    # Fill me in!
  end
end

Now the failing test (in test/frampton/post_test.exs):

describe "render/2" do
  test "returns our post with the body set" do
    markdown = "# Hello world!"                                                                                                                 
    assert Post.render(%Post{}, markdown) == {:ok, %Post{body: "<h1>Hello World</h1>
"}}
  end
end

Our render method will just be a wrapper around Earmark.as_html!/2 that puts the result into the body of the post. Add {:earmark, "~> 1.4.3"} to your deps in mix.exs, run mix deps.get and fill out render function:

def render(%__MODULE{} = post, markdown) do
  html = Earmark.as_html!(markdown)
  {:ok, Map.put(post, :body, html)}
end

Our test should now pass, and we can render posts! [Note: we’re using the as_html! method, which prints error messages instead of passing them back to the user. A smarter version of this would handle any errors and show them to the user. I leave that as an exercise for the reader…] Time to play around with this in an IEx prompt (run iex -S mix in your terminal):

iex(1)> alias Frampton.Post
Frampton.Post
iex(2)> post = %Post{}
%Frampton.Post{body: "", title: ""}
iex(3)> {:ok, updated_post} = Post.render(post, "# Hello world!")
{:ok, %Frampton.Post{body: "<h1>Hello world!</h1>
", title: ""}}
iex(4)> updated_post
%Frampton.Post{body: "<h1>Hello world!</h1>
", title: ""}

Great! That’s exactly what we’d expect. You can find the final code for this in the render_post branch.

LiveView Editor

Now for the fun part: Editing this live!

First, we’ll need a route for the editor to live at: /editor sounds good to me. LiveViews can be rendered from a controller, or directly in the router. We don’t have any initial state, so let's go straight from a router.

First, let's put up a minimal test. In test/frampton_web/live/editor_live_test.exs:

defmodule FramptonWeb.EditorLiveTest do
  use FramptonWeb.ConnCase
  import Phoenix.LiveViewTest

  test "the editor renders" do
    conn = get(build_conn(), "/editor")
    assert html_response(conn, 200) =~ "data-test="editor""
  end
end

This test doesn’t do much yet, but notice that it isn’t live view specific. Our first render is just the same as any other controller test we’d write. The page’s content is there right from the beginning, without the need to parse JavaScript or make API calls back to the server. Nice.

To make that test pass, add a route to lib/frampton_web/router.ex. First, we import the LiveView code, then we render our Editor:

import Phoenix.LiveView.Router
# … Code skipped ...
# Inside of `scope "/"`:
live "/editor", EditorLive

Now place a minimal EditorLive module, in lib/frampton_web/live/editor_live.ex:

defmodule FramptonWeb.EditorLive do
  use Phoenix.LiveView

  def render(assigns) do
    ~L"""
      <div data-test=”editor”>
        <h1>Hello world!</h1>
      </div>
      """
  end

  def mount(_params, _session, socket) do
    {:ok, socket}
  end
end

And we have a passing test suite! The ~L sigil designates that LiveView should track changes to the content inside. We could keep all of our markup in this render/1 method, but let’s break it out into its own template for demonstration purposes.

Move the contents of render into lib/frampton_web/templates/editor/show.html.leex, and replace EditorLive.render/1 with this one liner: def render(assigns), do: FramptonWeb.EditorView.render("show.html", assigns). And finally, make an EditorView module in lib/frampton_web/views/editor_view.ex:

defmodule FramptonWeb.EditorView do
  use FramptonWeb, :view
  import Phoenix.LiveView
end

Our test should now be passing, and we’ve got a nicely separated out template, view and “live” server. We can keep markup in the template, helper functions in the view, and reactive code on the server. Now let’s move forward to actually render some posts!

Handling User Input

We’ve got four tasks to accomplish before we are done:

  1. Take markdown input from the textarea
  2. Send that input to the LiveServer
  3. Turn that raw markdown into HTML
  4. Return the rendered HTML to the page.

Event binding

To start with, we need to annotate our textarea with an event binding. This tells the liveview.js framework to forward DOM events to the server, using our liveview channel. Open up lib/frampton_web/templates/editor/show.html.leex and annotate our textarea:

<textarea phx-keyup="render_post"></textarea>

This names the event (render_post) and sends it on each keyup. Let’s crack open our web inspector and look at the web socket traffic. Using Chrome, open the developer tools, navigate to the network tab and click WS. In development you’ll see two socket connections: one is Phoenix LiveReload, which polls your filesystem and reloads pages appropriately. The second one is our LiveView connection. If you let it sit for a while, you’ll see that it's emitting a “heartbeat” call. If your server is running, you’ll see that it responds with an “ok” message. This lets LiveView clients know when they've lost connection to the server and respond appropriately.

Now, type some text and watch as it sends down each keystroke. However, you’ll also notice that the server responds with a “phx_error” message and wipes out our entered text. That's because our server doesn’t know how to handle the event yet and is throwing an error. Let's fix that next.

Event handling

We’ll catch the event in our EditorLive module. The LiveView behavior defines a handle_event/3 callback that we need to implement. Open up lib/frampton_web/live/editor_live.ex and key in a basic implementation that lets us catch events:

def handle_event("render_post", params, socket) do
  IO.inspect(params)

  {:noreply, socket}
end

The first argument is the name we gave to our event in the template, the second is the data from that event, and finally the socket we’re currently talking through. Give it a try, typing in a few characters. Look at your running server and you should see a stream of events that look something like this:

There’s our keystrokes! Next, let’s pull out that value and use it to render HTML.

Rendering Markdown

Lets adjust our handle_event to pattern match out the value of the textarea:

def handle_event("render_post", %{"value" => raw}, socket) do

Now that we’ve got the raw markdown string, turning it into HTML is easy thanks to the work we did earlier in our Post module. Fill out the body of the function like this:

{:ok, post} = Post.render(%Post{}, raw)
IO.inspect(post)

If you type into the textarea you should see output that looks something like this:

Perfect! Lastly, it’s time to send that rendered html back to the page.

Returning HTML to the page

In a LiveView template, we can identify bits of dynamic data that will change over time. When they change, LiveView will compare what has changed and send over a diff. In our case, the dynamic content is the post body.

Open up show.html.leex again and modify it like so:

<div class="rendered-output">
  <%= @post.body %>
</div>

Refresh the page and see:

Whoops!

The @post variable will only be available after we put it into the socket’s assigns. Let’s initialize it with a blank post. Open editor_live.ex and modify our mount/3 function:

def mount(_params, _session, socket) do
  post = %Post{}
  {:ok, assign(socket, post: post)}
end

In the future, we could retrieve this from some kind of storage, but for now, let's just create a new one each time the page refreshes. Finally, we need to update the Post struct with user input. Update our event handler like this:

def handle_event("render_post", %{"value" => raw}, %{assigns: %{post: post}} = socket) do
  {:ok, post} = Post.render(post, raw)
  {:noreply, assign(socket, post: post)
end

Let's load up http://localhost:4000/editor and see it in action.

Nope, that's not quite right! Phoenix won’t render this as HTML because it’s unsafe user input. We can get around this (very good and useful) security feature by wrapping our content in a raw/1 call. We don’t have a database and user processes are isolated from each other by Elixir. The worst thing a malicious user could do would be crash their own session, which doesn’t bother me one bit.

Check the edit_posts branch for the final version.

Conclusion

That’s a good place to stop for today. We’ve accomplished a lot! We’ve got a dynamically rendering editor that takes user input, processes it and updates the page. And we haven’t written any JavaScript, which means we don’t have to maintain or update any JavaScript. Our server code is built on the rock-solid foundation of the BEAM virtual machine, giving us a great deal of confidence in its reliability and resilience.

In the next post, we’ll tackle making a shared editor, allowing multiple users to edit the same post. This project will highlight Elixir’s concurrency capabilities and demonstrate how LiveView builds on them to enable some incredible user experiences.



  • Code
  • Back-end Engineering

k

CLI Equivalents for Common MAMP PRO and Sequel Pro Tasks

Working on website front ends I sometimes use MAMP PRO to manage local hosts and Sequel Pro to manage databases. Living primarily in my text editor, a terminal, and a browser window, moving to these click-heavy dedicated apps can feel clunky. Happily, the tasks I have most frequently turned to those apps for —starting and stopping servers, creating new hosts, and importing, exporting, deleting, and creating databases— can be done from the command line.

I still pull up MAMP PRO if I need to change a host's PHP version or work with its other more specialized settings, or Sequel Pro to quickly inspect a database, but for the most part I can stay on the keyboard and in my terminal. Here's how:

Command Line MAMP PRO

You can start and stop MAMP PRO's servers from the command line. You can even do this when the MAMP PRO desktop app isn't open.

Note: MAMP PRO's menu icon will not change color to reflect the running/stopped status when the status is changed via the command line.

  • Start the MAMP PRO servers:
/Applications/MAMP PRO.app/Contents/MacOS/MAMP PRO cmd startServers
  • Stop the MAMP PRO servers:
/Applications/MAMP PRO.app/Contents/MacOS/MAMP PRO cmd stopServers
  • Create a host (replace host_name and root_path):
/Applications/MAMP PRO.app/Contents/MacOS/MAMP PRO cmd createHost host_name root_path

MAMP PRO-friendly Command Line Sequel Pro

Note: if you don't use MAMP PRO, just replace the /Applications/MAMP/Library/bin/mysql with mysql.

In all of the following commands, replace username with your user name (locally this is likely root) and database_name with your database name. The -p (password) flag with no argument will trigger an interactive password prompt. This is more secure than including your password in the command itself (like -pYourPasswordHere). Of course, if you're using the default password root is not particular secure to begin with so you might just do -pYourPasswordHere.

Setting the -h (host) flag to localhost or 127.0.0.1 tells mysql to look at what's on localhost. With the MAMP PRO servers running, that will be the MAMP PRO databases.

# with the MAMP PRO servers running, these are equivalent:
# /Applications/MAMP/Library/bin/mysql -h 127.0.0.1 other_options
# and
# /Applications/MAMP/Library/bin/mysql -h localhost other_options

/Applications/MAMP/Library/bin/mysql mysql_options # enter. opens an interactive mysql session
mysql> some command; # don't forget the semicolon
mysql> exit;
  • Create a local database
# with the MAMP PRO servers running
# replace `username` with your username, which is `root` by default
/Applications/MAMP/Library/bin/mysql -h localhost -u username -p -e "create database database_name"

or

# with the MAMP PRO servers running
# replace `username` (`root` by default) and `database_name`
/Applications/MAMP/Library/bin/mysql -h localhost -u username -p # and then enter
mysql> create database database_name; # don't forget the semicolon
mysql> exit

    MAMP PRO's databases are stored in /Library/Application Support/appsolute/MAMP PRO/db so to confirm that it worked you can

ls /Library/Application Support/appsolute/MAMP PRO/db
# will output the available mysql versions. For example I have
mysql56_2018-11-05_16-25-13     mysql57

# If it isn't clear which one you're after, open the main MAMP PRO and click
# on the MySQL "servers and services" item. In my case it shows "Version: 5.7.26"

# Now look in the relevant MySQL directory
ls /Library/Application Support/appsolute/MAMP PRO/db/mysql57
# the newly created database should be in the list
  • Delete a local database
# with the MAMP PRO servers running
# replace `username` (`root` by default) and `database_name`
/Applications/MAMP/Library/bin/mysql -h localhost -u username -p -e "drop database database_name"
  • Export a dump of a local database. Note that this uses mysqldump not mysql.
# to export an uncompressed file
# replace `username` (`root` by default) and `database_name`
/Applications/MAMP/Library/bin/mysqldump -h localhost -u username -p database_name > the/output/path.sql

# to export a compressed file
# replace `username` (`root` by default) and `database_name`
/Applications/MAMP/Library/bin/mysqldump -h localhost -u username -p database_name | gzip -c > the/output/path.gz

  • Export a local dump from an external database over SSH. Note that this uses mysqldump not mysql.

# replace `ssh-user`, `ssh_host`, `mysql_user`, `database_name`, and the output path

# to end up with an uncompressed file
ssh ssh_user@ssh_host "mysqldump -u mysql_user -p database_name | gzip -c" | gunzip > the/output/path.sql

# to end up with a compressed file
ssh ssh_user@ssh_host "mysqldump -u mysql_user -p database_name | gzip -c" > the/output/path.gz
  • Import a local database dump into a local database
# with the MAMP PRO servers running
# replace `username` (`root` by default) and `database_name`
/Applications/MAMP/Library/bin/mysql -h localhost -u username -p database_name < the/dump/path.sql
  • Import a local database dump into a remote database over SSH. Use care with this one. But if you are doing it with Sequel Pro —maybe you are copying a Craft site's database from a production server to a QA server— you might as well be able to do it on the command line.
ssh ssh_user@ssh_host "mysql -u username -p remote_database_name" < the/local/dump/path.sql


For me, using the command line instead of the MAMP PRO and Sequel Pro GUI means less switching between keyboard and mouse, less opening up GUI features that aren't typically visible on my screen, and generally better DX. Give it a try! And while MAMP Pro's CLI is limited to the essentials, command line mysql of course knows no limits. If there's something else you use Sequel Pro for, you may be able to come up with a mysql CLI equivalent you like even better.



  • Code
  • Front-end Engineering
  • Back-end Engineering

k

A Parent’s Guide to Working From Home, During a Global Pandemic, Without Going Insane

Though I usually enjoy working from Viget’s lovely Boulder office, during quarantine I am now working from home while simultaneously parenting my 3-year-old daughter Audrey. My husband works in healthcare and though he is not on the front lines battling COVID-19, he is still an essential worker and as such leaves our home to work every day.

Some working/parenting days are great! I somehow get my tasks accomplished, my kid is happy, and we spend some quality time together.

And some days are awful. I have to ignore my daughter having a meltdown and try to focus on meetings, and I wish I wasn’t in this situation at all. Most days are somewhere in the middle; I’m just doing my best to get by.

I’ve seen enough working parent memes and cries for help on social media to know that I’m not alone. There are many parents out there who now get to experience the stress and anxiety of living through a global pandemic while simultaneously navigating ways to stay productive while working from home and being an effective parent. Fun isn’t it?

I’m not an expert on the matter, but I have found a few small things that are making me feel a bit more sane. I hope sharing them will make someone else’s life easier too.

Truths to Accept

First, let’s acknowledge some truths about this new situation we find ourselves in:

Truth 1: We’ve lost something.

Parents have lost more than daycare and schools during this epidemic. We’ve lost any time that we had for ourselves, and that was really valuable. We no longer have small moments in the day to catch up on our personal lives. I no longer have a commute to separate my work duties from my mom duties, or catch up with my friends, or just be quiet.

Truth 2: We’re human.

The reason you can’t be a great employee and a great parent and a great friend and a great partner or spouse all day every day isn’t because you’re doing a bad job, it’s because being constantly wonderful in all aspects of your life is impossible. Pick one or two of those things a day to focus on.

Truth 3: We’re all doing our best.

This is the most important part of this article. Be kind to yourselves. This isn’t easy, and putting so much pressure on yourself that you break isn’t going to make it any easier.

Work from Home Goals

Now that we’ve accepted some truths about our current situation, let’s set some goals.

Goal 1: Do Good Work

At Viget, and wherever you work, with kids or without we all want to make sure that the quality of our work stays up throughout the pandemic and that we can continue to be reliable team members and employees to the best of our abilities.

Goal 2: Stay Sane

We need to figure out ways to do this without sacrificing ourselves entirely. For me, this means fitting my work into normal work hours as much as possible so that I can still have some downtime in the evenings.

Goal 3: Make This Sustainable

None of us knows how long this will last but we may as well begin mentally preparing for a long haul.

Work from Home Rules

Now, there are some great Work from Home Rules that apply to everyone with or without kids. My coworker Paul Koch shared these with the Viget team a Jeremy Bearimy ago and I agree this is also the foundation for working from home with kids.

  1. When you’re in a remote meeting, minimize other windows to stay focused
  2. Set a schedule and avoid chores*
  3. Take breaks away from the screen
  4. Plan your workday on the calendar+
  5. Be mindful of Slack and social media as a distraction
  6. Use timers+
  7. Keep your work area separate from where you relax
  8. Pretend that you’re still WFW
  9. Experiment and figure out what works for you

In the improv spirit I say “Yes, AND….” to these tips. And so, here are my adjusted rules for WFH while kiddos around: These have both been really solid tools for me, so let’s dig in.

Daily flexible schedule for kids

Day Planning: Calendars and Timers

A few small tweaks and adjustments make this even more doable for me and my 3-year-old. First- I don’t avoid chores entirely. If I’m going up and down the stairs all day anyway I might as well throw in a load of laundry while I’m at it. The more I can get done during the day means a greater chance of some down time in the evening.

Each morning I plan my day and Audrey’s day:

My Work Day:

Audrey's Day

Identify times of day you are more likely to be focus and protect them. For me, I know I have a block of time from 5-7a before Audrey wakes up and again during “nap time” from 1-3p.I built a construction paper “schedule” that we update and reorganize daily. We make the schedule together each day. She feels ownership over it and she gets to be the one who tells me what we do next.
Look at your calendar first thing and make adjustments either in your plans or move meetings if you have to.I’m strategic about screen time- I try to schedule it when I have meetings. It also helps to schedule a physical activity before screen time as she is less likely to get bored.
Make goals for your day: Tackle time sensitive tasks first. Take care of things that either your co-workers or clients are waiting on from you first, this will help your day be a lot less stressful. Non-time sensitive tasks come next- these can be done at any time of day.We always include “nap time” even though she rarely naps anymore. This is mostly a time for us both to be alone.

When we make the schedule together it also helps me understand her favorite parts of the day and reminds me to include them.

Once our days are planned, I also use timers to help keep the structure of the day. (I bought a great alarm clock for kids on Amazon that turns colors to signal bedtime and quiet time. It’s been hugely worth it for me.)

Timers for Me:

Timers for Audrey:

More than ever, I rely on a time tracking timer. At Viget we use Harvest to track time, and it has a handy built in timer, but there are many apps or online tools that could help you keep track of your time as well.Audrey knows what time she can come out of her room in the morning. If she wakes up before the light is green she plays quietly in her room.
I need a timer because the days and hours are bleeding together- without tracking as I go it would be really hard for me to remember when I worked on certain projects or know for certain if I gave Viget enough time for the day.She knows how long “nap time” is in the afternoon.
Starting and stopping the timer helps me turn on and off “work mode”, which is a helpful sanity bonus.Perhaps best of all I am not the bad guy! “Sorry honey, the light isn’t green yet and there really isn’t anything mommy can do about it” is my new favorite way to ensure we both get some quiet time.

Work from Home Rules: Updated for Parents

Finally, I have a few more Work from Home Rules for parents to add to the list:

  1. Minimize other windows in remote meetings
  2. Set a schedule and fit in some chores if time allows
  3. Take breaks away from the screen
  4. Schedule both your and your kids’ days
  5. Be mindful of Slack and social media as a distraction
  6. Use timers to track your own time and help your kids understand the day
  7. Keep your work area separate from where you relax
  8. Pretend that you’re still WFW
  9. Experiment and figure out what works for you
  10. Be prepared with a few activities
    • Each morning, have just ONE thing ready to go. This can be a worksheet you printed out, a coloring station setup, a new bag of kinetic sand you just got delivered from Amazon, a kids dance video on YouTube or an iPad game. Recently I started enlisting my mom to read stories on Facetime. The activity doesn’t have to be new each day but (especially for young kids) it has to be handy for you to start up quickly if your schedule changes
  11. Clearly communicate your availability with your team and project PMs
    • Life happens. Some days are going to be hard. Whatever you do, don’t burn yourself out or leave your team hanging. If you need to move a meeting or take a day off, communicate that as early and as clearly as you can.
  12. Take PTO if you can
    • None of us are superheroes. If you’re feeling overwhelmed- take a look at the next few days and figure out which one makes the most sense for you to take a break.
  13. Take breaks to be alone without doing a task
    • Work and family responsibilities have blended together, there’s almost no room for being alone. If you can find some precious alone time don’t use it to fold laundry or clean the bathroom. Just zone out. I think we all really need this.

Last but not least, enjoy your time at home if you can. This is an unusual circumstance and even though it’s really hard, there are parts that are really great too.

If you have some great WFH tips we’d love to hear about them in the comments!




k

So You've Written a Bad Design Take

So you’ve just written a blog post or tweet about why wireframes are becoming obsolete, the dangers of “too accessible” design, or how a certain style of icon creates “cognitive fatigue.”

Your post went viral, but now you’re getting ratioed by rude people on the Internet. That sucks! You were just trying to start a conversation and you probably didn’t deserve all that negativity (except for you, “too accessible” guy).

Most likely, you made one of these common mistakes:

1. You made generalizations about “design”

You, a good user-centered designer, know that you are not your user. Nor are you every designer.

First of all, let's acknowledge that there is no universal definition of design. Even if we narrow it down to software design, it’s still hard to make generalizations. Agency, in-house, product, startup, enterprise, non-profit, website, app, connected hardware, etc. – there are a lot of different work contexts and cultures for people with “designer” in their titles.

"The Design Industry" is not a thing, but even if it were, you don't speak for it. Don’t assume that the kind of design work you do is the universal default.

2. You didn’t share enough context

There are many great design books and few great design blog posts. (There are, to my knowledge, no great design tweets, but I am open to your suggestions.) Writing about design is not well suited to short formats, because context plays such an important role and there’s always a lot of it to cover.

Writing about your work should include as much context as you would include if you were presenting your portfolio for a job interview. What kind of organization did you work for? Who was your client and/or your stakeholders? What was the goal of the project? Your timeline? What was the makeup of your team? What were the notable business rules and constraints? How are you defining effectiveness and success?

Without these kinds of details, it’s not possible for other designers to know if what you’ve written is credible or applicable to them.

3. You were too certain

A blog post doesn’t need to be a dissertation. It’s okay to share hunches and anecdotes, but give the necessary caveats. And if you're making claims about science, bruh, you gotta cite your sources.

Be humble in your takes. Your account of what worked for you and why is more valuable to your peers than making sweeping claims and reheating the same old arguments. Be prepared to be told you’re wrong, and have the humility to realize that your perspective is just your perspective. Real conversations, like good design, are built on feedback and diverse viewpoints.

Together, we can improve the discourse in our information ecosystems. Don't generalize. Give context. Be humble.




k

Freebie: 264 Vector Audio DJ Pack Icons

Icons packs are among the most desirable freebies around. There are several out there, going from a wide array of topics from user interfaces to personal finance. But sometimes you can find some rather unusual but clever additions to the icons universe. This Vector Audio DJ Pack is a nice example, brought to you exclusively …

Freebie: 264 Vector Audio DJ Pack Icons Read More »




k

Freaky Logo Friday. Logo Mash-Ups

What would happen if the logos of famous brands suddenly wake up in the bed of another? Thats what the new tumblr blog Logo Mashups explores. It makes us think in the in the connections they share and how they are constantly appealing to our consumer mind through the commons grounds of symbology and typography.




k

Star Wars Playing Card Deck

I am huge fan of the universe of Star Wars, it is amazing how vast and detailed this it can be. I am also a lover of the playing cards designs, you can big array of topics from sexy to nerdy ones. Just like this ones, a complete set of playing cards based on the …

Star Wars Playing Card Deck Read More »




k

Wix Video — a great marketing tool for any website.

Increases time on page and boosts engagement with your site Thanks to the ever-increasing internet speeds, videos are in high demand. Right now, video is everywhere on social media, websites, and apps. We are watching them on all our screens, desktops, tablets, phones and smart TVs. It is expected a growth in video content up …

Wix Video — a great marketing tool for any website. Read More »