<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Andreas Olsson on Medium]]></title>
        <description><![CDATA[Stories by Andreas Olsson on Medium]]></description>
        <link>https://medium.com/@nonameolsson?source=rss-ad777112659d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*a1HDTdVGpChB8rvFJ06qwA.jpeg</url>
            <title>Stories by Andreas Olsson on Medium</title>
            <link>https://medium.com/@nonameolsson?source=rss-ad777112659d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 14:04:27 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@nonameolsson/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Customizing tmux for your project]]></title>
            <link>https://medium.com/@nonameolsson/customizing-tmux-for-your-project-5391dd9be2b4?source=rss-ad777112659d------2</link>
            <guid isPermaLink="false">https://medium.com/p/5391dd9be2b4</guid>
            <category><![CDATA[terminal]]></category>
            <category><![CDATA[tmux]]></category>
            <category><![CDATA[command-line]]></category>
            <dc:creator><![CDATA[Andreas Olsson]]></dc:creator>
            <pubDate>Wed, 29 Mar 2017 17:52:37 GMT</pubDate>
            <atom:updated>2017-03-29T18:09:02.580Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WK_KsEh4dG_wK5YdWZizJA.png" /></figure><p>Recently I started to get interested in <a href="https://tmux.github.io/">Tmux</a>. As a Mac, and a previous Linux user, I spend some time each day in the terminal. At work we use Windows, and the command prompt isn’t something that I like. I know there are alternatives, like <a href="http://babun.github.io/">Babun</a> and Bash on <a href="https://msdn.microsoft.com/en-us/commandline/wsl/about">Windows on Ubuntu for Window on Ubuntu on Ubuntu etc?…</a>(Yeah, I didn’t name it…).</p><p>So I started searching how to include a config file for Tmux in a project’s repo. This is what I figured out <a href="https://github.com/nonameolsson/tmux">https://github.com/nonameolsson/tmux</a></p><h3>Explanation</h3><p>Go to the repo and see for your self. Below is the concept of how this works.</p><p><strong>1. Create a detached session<br></strong>We create this so we have more control over it. At the end of this article we connect to the session, but this is optional.</p><pre>$SESSION=my_awesome_project<br>tmux new-session -d -s $SESSION</pre><p><strong>2. Create a window in that session<br></strong>A session doesn’t automatically have a window. Therefore we have to create it.</p><pre>tmux new-window -t $SESSION:1 -n &#39;webserver&#39;</pre><p>webserver here is the name of your new window. You should give a proper description of that that windows contains.</p><p><strong>3. Configure the new window<br></strong>We will use the window for a <a href="https://docs.python.org/2/library/simplehttpserver.html">SimpleHTTPServer</a>. The window till contain three sections, as you see in the picture. Two horizontal ones, and the one bottom one will contain two horizontal windows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3Qor0XjRt7fja_v0aTgbTg.png" /></figure><p>Split the window in two horizontal windows and start the server.</p><pre>tmux select-window -t $SESSION:1<br>tmux split-window -v<br>tmux send-keys &#39;python -m SimpleHTTPServer&#39; C-m</pre><p>Split the bottom window into two vertical windows, and put some pre-filled text in the right one. Add C-m after the text if you want to execute the command.</p><pre>tmux split-window -h<br>tmux send-keys &#39;this is a prefilled text&#39;</pre><p><strong>4. Create second window<br></strong>Now we will create the second window. You should of course name this with a good name. I use front-end in this example.</p><pre>tmux new-window -t $SESSION:2 -n ‘front-end’<br>tmux select-window -t $SESSION:2</pre><p>Let’s run some code in the window.</p><pre>tmux send-keys ‘gulp watch’ C-m</pre><p>If we were using .i.e. gulp this is where wi automatically will launch the watch task. This could be whatever script you would like: webpack, npm etc.</p><p><strong>5. Attach to the window<br></strong>If you run the code we’ve written so far, a tmux session will start with our configuration. But you wouldn’t notice anything special. To open up our tmux configuration in the terminal we must add a command to attach to it in our script.</p><pre>mux attach-session -t $SESSION</pre><p>By doing so, our terminal will attach to our running detached session. This is pretty nice, because the web server is already running, and we have a running gulp task.</p><p>This will be the result.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3Qor0XjRt7fja_v0aTgbTg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ihud1kyo9akEPUpfRjlOLQ.png" /><figcaption>To the left: Window named ‘</figcaption></figure><p><strong>6. What now?<br></strong>Feel free to commit pull requests to my <a href="https://github.com/nonameolsson/tmux">repo</a>. I appreciate all suggestion of how this could be improved.</p><p>Sincerely,<em><br>Andreas</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5391dd9be2b4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Pretty Git log]]></title>
            <link>https://medium.com/@nonameolsson/pretty-git-log-9917664dd786?source=rss-ad777112659d------2</link>
            <guid isPermaLink="false">https://medium.com/p/9917664dd786</guid>
            <category><![CDATA[github]]></category>
            <category><![CDATA[terminal]]></category>
            <category><![CDATA[git]]></category>
            <dc:creator><![CDATA[Andreas Olsson]]></dc:creator>
            <pubDate>Fri, 06 May 2016 06:37:26 GMT</pubDate>
            <atom:updated>2016-05-06T06:42:49.558Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9WAxvHXeSi1sWxJZ0heR2A.png" /></figure><p>Are you tired of scrolling page through page in your terminal to see your Git log? I am. So I did some googling and found a really great fix for this!</p><h4>The magic snippet</h4><pre>git log — graph — pretty=format:’%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)&lt;%an&gt;%Creset’ — abbrev-commit</pre><p>Try it! This is the result.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XnbjjniTjQ58OuWozQia5A.png" /></figure><p>Looks great, doesn’t it? But it’s really a lot to remember and type. How about getting the same result just by writing “git lg”?</p><h4>Add it as an alias</h4><pre>git config — global alias.lg “log — color — graph — pretty=format:’%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)&lt;%an&gt;%Creset’ — abbrev-commit”</pre><h4>Use it</h4><p>Now just write “git lg” and enjoy the pretty git log!</p><p><em>Credit to: </em><a href="https://coderwall.com/p/euwpig/a-better-git-log"><em>https://coderwall.com/p/euwpig/a-better-git-log</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9917664dd786" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>