<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
    <channel>
      <title>Mosab Ahmad Ibrahim</title>
      <link>https://mosab.co.uk</link>
      <description>an oddly wired brain!</description>
      <generator>Zola</generator>
      <language>en</language>
      <atom:link href="https://mosab.co.uk/rss.xml" rel="self" type="application/rss+xml"/>
      <lastBuildDate>Sun, 28 Apr 2024 00:00:00 +0000</lastBuildDate>
      <item>
          <title>Joining the Tour De Ricky 200km Ride: A New Adventure Awaits!</title>
          <pubDate>Sun, 28 Apr 2024 00:00:00 +0000</pubDate>
          <author>Unknown</author>
          <link>https://mosab.co.uk/blog/tour-de-ricky-2024/</link>
          <guid>https://mosab.co.uk/blog/tour-de-ricky-2024/</guid>
          <description xml:base="https://mosab.co.uk/blog/tour-de-ricky-2024/">&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;mosab.co.uk&#x2F;blog&#x2F;tour-de-ricky-2024&#x2F;tour-de-ricky-2024-banner.png&quot; alt=&quot;Tour De Ricky 2024 Banner&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;p&gt;I am beyond excited to announce that I will be participating in the Tour De Ricky 200km (approximately 125 miles) ride event in 2024! As a beginner, yet passionate cyclist, I have always been drawn to challenging myself and pushing my limits (whenever I got time away from my job and other responsibilities), and this event promises to be an unforgettable experience.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;what-is-tour-de-ricky&quot;&gt;What is Tour De Ricky?&lt;&#x2F;h2&gt;
&lt;p&gt;Tour De Ricky is an Audax event, part of Audax UK, a organization that promotes long-distance cycling events.&lt;&#x2F;p&gt;
&lt;p&gt;What is an Audax ride, you ask me? No better answer than what Audax UK&#x27;s website itself &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.audax.uk&#x2F;about-audax&#x2F;new-to-audax&#x2F;&quot;&gt;has to say&lt;&#x2F;a&gt;, from which I quote:&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;An Audax ride - known internationally as a Randonnée - is a cycle ride that has to be completed within a set time limit, including any stops to eat or rest. In most cases, riders have to maintain a minimum speed of 15km&#x2F;h (some particularly long or hilly rides have a slightly lower minimum speed) and importantly a maximum speed of 30km&#x2F;h. That&#x27;s a little under 10mph and 20mph in Imperial measures.&lt;&#x2F;p&gt;
&lt;p&gt;It&#x27;s not a race and individual riders&#x27; times are not published; if you finish within the time limit, you&#x27;ve succeeded.&lt;&#x2F;p&gt;
&lt;p&gt;Riders are expected to be self-sufficient. That doesn&#x27;t mean that you have to ride alone or that you can&#x27;t call on the services of a village blacksmith to help weld your frame back together, should the worst happen, but you navigate for yourself and if you do have any mechanical problems along the way, it&#x27;s down to you to sort them or get yourself home.&lt;&#x2F;p&gt;
&lt;p&gt;Some rides offer food along the way; more often, you&#x27;ll be finding your own sources of fuel, from cafes and pubs to village shops and service stations.&lt;&#x2F;p&gt;
&lt;p&gt;Throw in the hills, the British weather and distances ranging from 50km to 1400km and what might have sounded like a simple bike ride becomes more of a challenge - one that is appealing to increasing numbers of cyclists year on year.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;You can also watch this great video explaining what Audax is:&lt;&#x2F;p&gt;
&lt;div class=&quot;aspect-w-16 aspect-h-9&quot;&gt;
  &lt;iframe frameborder=&quot;0&quot;
    src=&quot;https:&#x2F;&#x2F;www.youtube-nocookie.com&#x2F;embed&#x2F;qreIQjtClbw?si=mXe6uLa_nD2WO8Bq&quot;
    title=&quot;YouTube video player&quot; frameborder=&quot;0&quot;
    allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen
    allowfullscreen&gt;&lt;&#x2F;iframe&gt;
&lt;&#x2F;div&gt;
&lt;p&gt;The Tour De Ricky event in particular offers a range of routes, 50km, 100km, and 200km long in distance, but I have set my sights on the 200km challenge. This particular route promises a full day of excitement, with a mix of rolling hills, scenic countryside, and quiet roads.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;the-200km-route-a-challenge-awaits&quot;&gt;The 200km Route: A Challenge Awaits&lt;&#x2F;h2&gt;
&lt;p&gt;The 200km route is designed to test the rider&#x27;s endurance and cycling skills. With a total elevation gain of 2,500 meters, I will need to be prepared for this ride, since it has been a long time with me out of the saddle, and in a relatively short period of time too (4-5 weeks). The route will take the riders through some of the most beautiful landscapes in the country, with picturesque villages, ancient woodlands, and stunning views of the surrounding countryside.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;why-i-m-excited&quot;&gt;Why I&#x27;m Excited&lt;&#x2F;h2&gt;
&lt;p&gt;I&#x27;m excited to join the Tour De Ricky 200km bike ride for several reasons.&lt;&#x2F;p&gt;
&lt;p&gt;Firstly, I love the sense of community that comes with participating in a mass cycling event that is not competitive in nature (i.e. it is not a race). I&#x27;m looking forward to meeting fellow cyclists, sharing stories, and making new friends.&lt;&#x2F;p&gt;
&lt;p&gt;Secondly, I&#x27;m eager to challenge myself and push my limits. Completing this event will be a huge achievement, and I&#x27;m excited to see how far I can push myself. Finally, I&#x27;m looking forward to the scenic route and the opportunity to explore new parts of the country.&lt;&#x2F;p&gt;
&lt;p&gt;Thirdly, I have participated in the 100km ride in 2022, and it is still my longest ride so far (~120km). I did not get back to the start within the event&#x27;s time limit, and I even lost my Brevit! So it was not counted as a success in Audax UK records (although it is a huge success in my personal records), so I am determined to get to the finish line within the time limit this year.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;training-and-preparation&quot;&gt;Training and Preparation&lt;&#x2F;h2&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;mosab.co.uk&#x2F;blog&#x2F;tour-de-ricky-2024&#x2F;training-plan.png&quot; alt=&quot;Training Plan&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;p&gt;While I&#x27;m excited, I&#x27;m also aware that this event requires careful preparation and training. Over the coming weeks and months, I will be putting in the miles, honing my cycling skills, and building up my endurance. I will be working on my bike, making sure it&#x27;s in top condition, and preparing myself mentally and physically for the challenge ahead.&lt;&#x2F;p&gt;
&lt;p&gt;Above is a hand drawn&#x2F;written training calendar that fits my current work schedule (with return to office et al), and hopefully I can manage to finish it. It is not enough, but it will have to do.&lt;&#x2F;p&gt;
&lt;p&gt;I also discovered that the ride day will be in one of my oncall shifts, so I will have to find a swap for that! :D&lt;&#x2F;p&gt;
&lt;h2 id=&quot;conclusion&quot;&gt;Conclusion&lt;&#x2F;h2&gt;
&lt;p&gt;The Tour De Ricky 200km ride, if successful, will be my first Century Ride, a ride that is a 100 miles long, or more, and will be a dream come true for me. I have done a &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;mosab.co.uk&#x2F;blog&#x2F;first-metric-century&#x2F;&quot;&gt;Metric Centry&lt;&#x2F;a&gt; before, also with Tour De Ricky. I&#x27;m excited to be part of this amazing event once again, to challenge myself, and to experience the thrill of long-distance cycling. If you&#x27;re a fellow cyclist, I encourage you to join me on this adventure. Let&#x27;s ride together and make some unforgettable memories!&lt;&#x2F;p&gt;
&lt;h2 id=&quot;useful-links&quot;&gt;Useful Links:&lt;&#x2F;h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;tourdericky.uk&#x2F;&quot;&gt;Tour De Ricky Website&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;tourdericky.uk&#x2F;200km-a-full-day-of-challenge&#x2F;&quot;&gt;Tour De Ricky 200km Route&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.audax.uk&#x2F;&quot;&gt;Audax UK Website&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
</description>
      </item>
      <item>
          <title>My First Ever Woodworking Project: The Moravian Workbench</title>
          <pubDate>Sun, 16 Apr 2023 00:00:00 +0000</pubDate>
          <author>Unknown</author>
          <link>https://mosab.co.uk/blog/moravian-workbench/</link>
          <guid>https://mosab.co.uk/blog/moravian-workbench/</guid>
          <description xml:base="https://mosab.co.uk/blog/moravian-workbench/">&lt;p&gt;For my first ever woodworking project I wanted to make a bench. A bench is an essential tool for a
woodworker, and it is also an amazing project to learn from. After a LOT of time spent researching
the type of bench I wanted to make, the Moravian Workbench was my favourite, so I went with it!&lt;&#x2F;p&gt;
&lt;p&gt;Started the project with a hand drawn sketch for the bench:&lt;&#x2F;p&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;mosab.co.uk&#x2F;blog&#x2F;moravian-workbench&#x2F;moravian-workbench-design.png&quot; alt=&quot;Moravian Workbench Design&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;p&gt;The design is a centuries old design called The Moravian Workbench that is portable. This can be
knocked down moved and reassembled.&lt;&#x2F;p&gt;
&lt;p&gt;Everything was made with hand tools, with very few exceptions. Here is how the project looks now:&lt;&#x2F;p&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;mosab.co.uk&#x2F;blog&#x2F;moravian-workbench&#x2F;moravian-workbench-1.png&quot; alt=&quot;Moravian Workbench&quot; &#x2F;&gt;
&lt;img src=&quot;https:&#x2F;&#x2F;mosab.co.uk&#x2F;blog&#x2F;moravian-workbench&#x2F;moravian-workbench-2.png&quot; alt=&quot;Moravian Workbench&quot; &#x2F;&gt;
&lt;img src=&quot;https:&#x2F;&#x2F;mosab.co.uk&#x2F;blog&#x2F;moravian-workbench&#x2F;moravian-workbench-3.png&quot; alt=&quot;Moravian Workbench&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;p&gt;There is a room for improvement, but I am pretty glad with the output. Not too bad for a first
timer.&lt;&#x2F;p&gt;
</description>
      </item>
      <item>
          <title>My First Metric Century</title>
          <pubDate>Sat, 21 May 2022 23:00:00 +0000</pubDate>
          <author>Unknown</author>
          <link>https://mosab.co.uk/blog/first-metric-century/</link>
          <guid>https://mosab.co.uk/blog/first-metric-century/</guid>
          <description xml:base="https://mosab.co.uk/blog/first-metric-century/">&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;mosab.co.uk&#x2F;blog&#x2F;first-metric-century&#x2F;audax-brevet.png&quot; alt=&quot;Audax Tour De Ricky&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Today I finished my first &lt;em&gt;&lt;strong&gt;metric century&lt;&#x2F;strong&gt;&lt;&#x2F;em&gt; (a ride that is 100km or more)! Was riding in &lt;em&gt;&lt;strong&gt;Tour De
Ricky&lt;&#x2F;strong&gt;&lt;&#x2F;em&gt; audax, and it was a challenging route for me. Took me 7 hours and 22 minutes of riding (10
hours if you include the cafe and rest stops) but I did it!&lt;&#x2F;p&gt;
&lt;p&gt;Distance: 119.8 km
Elevation Gain: 1134 m
Time: 7h 22m&lt;&#x2F;p&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;mosab.co.uk&#x2F;blog&#x2F;first-metric-century&#x2F;metric-century-strava.jpg&quot; alt=&quot;Metric Century Stats&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Some lessons I learned from this ride are (in a very raw format, will iterate on them later):&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;I needed specific recommendations in regards to what to wear, and most resources talk guidelines,
which is something you don&#x27;t want for the first few rides. In order to be able to take a guideline,
you need to have tried a few rides in different conditions first. I wanted specifics (like wear a
bibshort if it 10 degrees celsius or above, etc).&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;I definitely need more gears for those hills&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;It was great knowing my FTP, as I could only finish the ride by actively trying to keep my power
below the FTP especially on those hill.&lt;&#x2F;p&gt;
&lt;p&gt;3.1. That required better shifting for the gears, and that&#x27;s something I have always heard, but never
really understood&lt;&#x2F;p&gt;
&lt;p&gt;3.2. I also don&#x27;t know if I was crossing the chains, will need to see&lt;&#x2F;p&gt;
&lt;p&gt;3.3. This is one of the areas that people might benefit from videos on how to change the gears and in
what order just like car drivers have&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;I DEFINITELY need to increase my FTP&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;I was lucky that I did not have any punctures, or mechanicals, but it was assuring that I got tools
with me&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;The back bag probably shouldn&#x27;t have been there (over worrying about the weather made me pack extra
just in case)&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;I probably should&#x27;ve taken the power bank. Phones almost died at the end&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;I had a rear freehub that needs changing (there is play in the cassette) but there is nothing I
could do about it, as the part was delivered right before the ride. Was afraid it fails on me during
the ride, and paid extra attention not to put sudden impact on the drivetrain, luckily it didn&#x27;t
fail!&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Having the route on multiple devices was helpful&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Cycling navigation experience could use a lot of improvement. This is not a solved problem yet.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Investing in a bike fit was one of the best things I did! Can&#x27;t imagine doing this distance with the
original bike setup I got!&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Servicing the bike, and changing the worn chain was also a contributing factor to minimise the risk
of getting a mechanical, I guess!&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;I should&#x27;ve planned the transportation to and from the start&#x2F;finish point better! That cost me a
late start, and because of that I ended up doing the whole route alone instead of doing it with a
bunch of fellow colleagues, but that&#x27;s ok.&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;mosab.co.uk&#x2F;blog&#x2F;first-metric-century&#x2F;metric-century-finish-line.jpg&quot; alt=&quot;Me at the finish line&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Here is a video about the ride:&lt;&#x2F;p&gt;
&lt;div class=&quot;aspect-w-16 aspect-h-9&quot;&gt;
  &lt;iframe frameborder=&quot;0&quot;
    src=&quot;https:&#x2F;&#x2F;www.youtube-nocookie.com&#x2F;embed&#x2F;uhsU0AqyNgM?si=mXe6uLa_nD2WO8Bq&quot;
    title=&quot;YouTube video player&quot; frameborder=&quot;0&quot;
    allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen
    allowfullscreen&gt;&lt;&#x2F;iframe&gt;
&lt;&#x2F;div&gt;
</description>
      </item>
      <item>
          <title>Joining Production Engineering at Facebook&#x2F;Meta</title>
          <pubDate>Mon, 07 Mar 2022 00:00:00 +0000</pubDate>
          <author>Unknown</author>
          <link>https://mosab.co.uk/blog/joining-facebook-meta/</link>
          <guid>https://mosab.co.uk/blog/joining-facebook-meta/</guid>
          <description xml:base="https://mosab.co.uk/blog/joining-facebook-meta/">&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;mosab.co.uk&#x2F;blog&#x2F;joining-facebook-meta&#x2F;meta-logo.png&quot; alt=&quot;Meta&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Super excited and thrilled to share that I am joining the Production Engineering team at
&lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;facebook.com&quot;&gt;Meta&#x2F;Facebook&lt;&#x2F;a&gt; in London! Today is my first day.&lt;&#x2F;p&gt;
&lt;p&gt;Production Engineering was created at Facebook to work with engineering teams and partners to
champion the Reliability, Scalability, Performance, and Security posture of production services. PEs
are hybrid software and systems engineers; they are the glue holding things together, whether that’s
infrastructure and software or teams and processes.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;mosab.co.uk&#x2F;blog&#x2F;joining-facebook-meta&#x2F;london-infra.png&quot; alt=&quot;FB London Infra logo on the wall&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;p&gt;The true power of Production Engineering comes from developing strong relationships with partner
engineering teams and valuing collaboration and knowledge sharing to build technical expertise and
community. PE’s write production code and solve hard problems in systems serving billions of people
across Facebook, services like Instagram, WhatsApp, and Oculus, and in diverse infrastructure areas
like machine learning&#x2F;inference, storage, and networking.&lt;&#x2F;p&gt;
&lt;p&gt;If you still are trying to figure out what a production engineer does, watch &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=TnCY6Apxibk&quot;&gt;this
video&lt;&#x2F;a&gt;!&lt;&#x2F;p&gt;
&lt;div class=&quot;aspect-w-16 aspect-h-9&quot;&gt;
  &lt;iframe frameborder=&quot;0&quot;
    src=&quot;https:&#x2F;&#x2F;www.youtube-nocookie.com&#x2F;embed&#x2F;TnCY6Apxibk?si=mXe6uLa_nD2WO8Bq&quot;
    title=&quot;YouTube video player&quot; frameborder=&quot;0&quot;
    allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen
    allowfullscreen&gt;&lt;&#x2F;iframe&gt;
&lt;&#x2F;div&gt;
&lt;p&gt;Or you can watch this presentation at SRECon 2015 that talks about Production Engineering at
Facebook and how it evolved:&lt;&#x2F;p&gt;
&lt;div class=&quot;aspect-w-16 aspect-h-9&quot;&gt;
  &lt;iframe frameborder=&quot;0&quot;
    src=&quot;https:&#x2F;&#x2F;www.youtube-nocookie.com&#x2F;embed&#x2F;ugkkza3vKbc?si=mXe6uLa_nD2WO8Bq&quot;
    title=&quot;YouTube video player&quot; frameborder=&quot;0&quot;
    allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen
    allowfullscreen&gt;&lt;&#x2F;iframe&gt;
&lt;&#x2F;div&gt;
&lt;p&gt;Can not wait to get starts on a journey of challenges, learnings and hyper growth!&lt;&#x2F;p&gt;
</description>
      </item>
      <item>
          <title>About SRE with null++</title>
          <pubDate>Fri, 04 Dec 2020 00:00:00 +0000</pubDate>
          <author>Unknown</author>
          <link>https://mosab.co.uk/blog/second-podcast-appearance-nullplusplus/</link>
          <guid>https://mosab.co.uk/blog/second-podcast-appearance-nullplusplus/</guid>
          <description xml:base="https://mosab.co.uk/blog/second-podcast-appearance-nullplusplus/">&lt;p&gt;Today, I was the guest in one of my favourite podcasts in Arabic:
&lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;nullplus.plus&#x2F;&quot;&gt;&quot;null++&quot;&lt;&#x2F;a&gt;. It is my favourite for two reasons:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;One of the two co-hosts is a dear friend of mine, and I hope I become friends with the other
co-host as well. Both co-hosts are active in the tech scene in Egypt, and are very competent
engineers.&lt;&#x2F;li&gt;
&lt;li&gt;The podcast is a valuable resource for people in Egypt interested in the tech scene, especially
new comers, to know not only the latest trends and best practices, but also have some guidance
along the way to get there.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;Here is the link to &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;nullplus.plus&#x2F;episodes&#x2F;episode41-sre-with-mosab-ibrahim&quot;&gt;Episode[42]: SRE with Mosab Ibrahim&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;If you have any feedback, or questions, please feel free to &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;mosab.co.uk&#x2F;pages&#x2F;contact.html&quot;&gt;reach out&lt;&#x2F;a&gt; to me.&lt;&#x2F;p&gt;
</description>
      </item>
      <item>
          <title>My First Podcast Appearance!</title>
          <pubDate>Sun, 12 Jul 2020 00:00:00 +0000</pubDate>
          <author>Unknown</author>
          <link>https://mosab.co.uk/blog/my-first-podcast-appearance/</link>
          <guid>https://mosab.co.uk/blog/my-first-podcast-appearance/</guid>
          <description xml:base="https://mosab.co.uk/blog/my-first-podcast-appearance/">&lt;p&gt;I have recently received an invitation from my dear friend &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;iahmadzain.me&#x2F;&quot;&gt;Ahmed Zain&lt;&#x2F;a&gt;, who
runs a very interesting podcast under the name of &quot;Tech and Coffee&quot;, that is generally made for
sharing experiences around tech and, you guessed it, coffee!&lt;&#x2F;p&gt;
&lt;p&gt;This is the first time I participate in a podcast, and it was a humbling experience. We talked about
many things; How I started in tech, how my career developed over time, what it means to be an SRE,
my journey from Egypt to Germany, and finally the United Kingdom, as well as other topics. The
podcast and the episode are in Arabic.&lt;&#x2F;p&gt;
&lt;p&gt;You can listen to it on any of the following links&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=1ehCq1HQ0P0&quot;&gt;Youtube&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;open.spotify.com&#x2F;episode&#x2F;79kBvpBKfbOp0agzCwnsDa?si=l2MJzyKLTdGmQfo4iEk4_A&quot;&gt;Spotify&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;podcasts.apple.com&#x2F;eg&#x2F;podcast&#x2F;s1e9-tech-chat-with-mosab-ibrahim-the-sre&#x2F;id1493504725?i=1000484512358&quot;&gt;Apple Podcast&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
</description>
      </item>
      <item>
          <title>Joining Twitter SRE Team!</title>
          <pubDate>Fri, 08 May 2020 00:00:00 +0000</pubDate>
          <author>Unknown</author>
          <link>https://mosab.co.uk/blog/joining-twitter/</link>
          <guid>https://mosab.co.uk/blog/joining-twitter/</guid>
          <description xml:base="https://mosab.co.uk/blog/joining-twitter/">&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;mosab.co.uk&#x2F;blog&#x2F;joining-twitter&#x2F;twitter-logo.png&quot; alt=&quot;Twitter&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Last Friday was my last day at &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;gocardless.com&quot;&gt;GoCardless&lt;&#x2F;a&gt;. It has been
a year -and change- full of knowing smart and great colleagues, and learning a
lot from them. Special shout-out to the Core Infrastructure team!&lt;&#x2F;p&gt;
&lt;p&gt;I am super excited that starting next Monday I will be joining
&lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;twitter.com&quot;&gt;Twitter&lt;&#x2F;a&gt;&#x27;s Site Reliability Engineering team
&lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;twitter.com&#x2F;TwitterSRE&quot;&gt;@TwitterSRE&lt;&#x2F;a&gt; in London! I have met some of the
team already, and can&#x27;t wait to start working with them and meet the rest!&lt;&#x2F;p&gt;
&lt;p&gt;This is a huge step for me, and I look forward to months and years of hard
working, learning and making new friends while empowering everyone in the world
to create and share ideas and information instantly without barriers!&lt;&#x2F;p&gt;
</description>
      </item>
      <item>
          <title>Top 10 Man Pages Every Linux Sys Admin Should Read</title>
          <pubDate>Sat, 08 Feb 2020 10:00:00 +0000</pubDate>
          <author>Unknown</author>
          <link>https://mosab.co.uk/blog/top-ten-linux-man-pages/</link>
          <guid>https://mosab.co.uk/blog/top-ten-linux-man-pages/</guid>
          <description xml:base="https://mosab.co.uk/blog/top-ten-linux-man-pages/">&lt;p&gt;Came across an interesting question on Quora (A great question and answers website where questions
are asked, answered, and edited by Quora&#x27;s community, either factually or in the form of opinions).&lt;&#x2F;p&gt;
&lt;p&gt;The question was:&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;What are the top 10 man pages that most Linux administrators should read?&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;Intrigued by the question, I spent some time reading the answers, and there were great answers, but
the question was inspiring. However, this was an opportunity for me to reflect on what man pages I
found useful, and thought it might benefit others as well, so here is the answer I provided:&lt;&#x2F;p&gt;
&lt;p&gt;Almost forgot all about it, until someone shared my answer today on Quora, which made me share it
here as well.&lt;&#x2F;p&gt;
&lt;p&gt;The answer goes as follows:&lt;&#x2F;p&gt;
&lt;p&gt;sake of argument, if I had to choose 10 man pages they would be:
I agree with Jesse Pollard[^1], most linux administrators should read all of them once. However for the&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;man man&lt;&#x2F;code&gt;: understand how &lt;code&gt;man&lt;&#x2F;code&gt; itself is organized, what the different man sections are and what they mean.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;man ps&lt;&#x2F;code&gt;: contains a lot of useful information about processes, their life cycles, and their states. Every linux system administrator should know how processes work in linux. The information here is handy in interpreting the output of other commands that include any information about processes running on the linux box you are maintaining&#x2F;debugging.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;man find&lt;&#x2F;code&gt;: surprisingly, you can learn a lot about linux filesystems just by reading this (long) man page. Understanding this page helps you gain deeper levels of understanding. You will appreciate the output of commands like &lt;code&gt;ls&lt;&#x2F;code&gt; much more when you do.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;man vmstat&lt;&#x2F;code&gt;: (if you don’t have &lt;code&gt;vmstat&lt;&#x2F;code&gt; installed, get it installed, now!) &lt;code&gt;vmstat&lt;&#x2F;code&gt; is extremely handy for gaining interesting insights into how different linux subsystems and the processes running on it are behaving. Study &lt;code&gt;vmstat&lt;&#x2F;code&gt;’s different options; it will make your life easier.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;man iptables&lt;&#x2F;code&gt;: linux’s tool for IPv4 and Ipv6 filtration, as well as NAT.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;man ss&lt;&#x2F;code&gt;: a linux utitlity to investigate socket related stuff.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;man sar&lt;&#x2F;code&gt;: a utility to collect, report, and&#x2F;or save system activity. Can prove useful in various areas of investigation.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;man iostat&lt;&#x2F;code&gt;: a utility that provides statistics about CPU, io devices and partitions.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;man strace&lt;&#x2F;code&gt;: traces system calls and signals that a process performs.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;man lsof&lt;&#x2F;code&gt;: a tool that lists open file descriptors for all processes. You can also zoom in on a single process using its &lt;code&gt;pid&lt;&#x2F;code&gt;.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;I think if an administrator masters those, anything else becomes that much easier.&lt;&#x2F;p&gt;
&lt;p&gt;To read the rest of the answers, you can check the &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.quora.com&#x2F;What-are-the-top-10-man-pages-that-most-Linux-administrators-should-read&quot;&gt;question on
quora&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;hr &#x2F;&gt;
&lt;p&gt;[^1] &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.quora.com&#x2F;What-are-the-top-10-man-pages-that-most-Linux-administrators-should-read&#x2F;answer&#x2F;Jesse-Pollard-1&quot;&gt;Jesse Pollard&#x27;s answer&lt;&#x2F;a&gt; to the question.&lt;&#x2F;p&gt;
</description>
      </item>
      <item>
          <title>2018: State of the Union</title>
          <pubDate>Sun, 13 Jan 2019 00:00:00 +0000</pubDate>
          <author>Unknown</author>
          <link>https://mosab.co.uk/blog/2018-state-of-the-union/</link>
          <guid>https://mosab.co.uk/blog/2018-state-of-the-union/</guid>
          <description xml:base="https://mosab.co.uk/blog/2018-state-of-the-union/">&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;mosab.co.uk&#x2F;blog&#x2F;2018-state-of-the-union&#x2F;mosab-london-bridge.jpg&quot; alt=&quot;Millennium Bridge, London, United Kingdom&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;p&gt;The last year, 2018, has been a very busy year for me, I barely had a break! I
am going to list what has been accomplished, and important milestones very
briefly in the following few paragraphs.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;work-and-career&quot;&gt;Work and Career&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;java-in-production&quot;&gt;Java in Production&lt;&#x2F;h3&gt;
&lt;p&gt;In November 2017, I joined an adtech company in Berlin, Germany to work on their
ad delivery server which was written in PHP and used technologies like Nginx,
MongoDB, and Redis. Most of the work was bug fixing, and little was about adding
new features. The project quickly became very boring, and any attempt to enhance
it, or refactor any part of it was rejected and foiled. Early last year, I
switched to another interesting project that was being built from scratch. This
time the project was built using the Java programming language, and the Vert.x
framework was used. Later Spring framework was used for most of the
microservices involved in the project. In both cases, this was my first time to
develop, maintain and deploy Java code to production.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;scalability&quot;&gt;Scalability&lt;&#x2F;h3&gt;
&lt;p&gt;Back in Egypt, the most traffic I have dealt with was around 100K requests per
week! Looking to work on projects that handled large amounts of traffic was one
of the main reasons I moved to Germany.&lt;&#x2F;p&gt;
&lt;p&gt;The PHP project was handling 100K requests per hour, compared to the maximum I
had in Egypt that was a big step forward. But the production footprint of the
java project kept growing month over month till we reached a milestone of
handling more than &lt;strong&gt;1 billion requests per day&lt;&#x2F;strong&gt;. It was a very exciting
journey, and I learned a lot from it in terms of teams, companies and systems
scalability.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;the-year-of-the-good-reads&quot;&gt;The Year of The Good Reads&lt;&#x2F;h3&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;mosab.co.uk&#x2F;blog&#x2F;2018-state-of-the-union&#x2F;2018-good-reads.png&quot; alt=&quot;2018 Good Reads Challenge Results&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;p&gt;This year, I started with a pledge to read 10 books on the annual Good Reads
challenge. I ended up &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.goodreads.com&#x2F;user_challenges&#x2F;10640205&quot;&gt;reading 18
books&lt;&#x2F;a&gt;! The books were
mainly in the following areas&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Linux internals&#x2F;kernel books&lt;&#x2F;li&gt;
&lt;li&gt;Data structures and algorithms&lt;&#x2F;li&gt;
&lt;li&gt;Python programming&lt;&#x2F;li&gt;
&lt;li&gt;Linux systems programming&lt;&#x2F;li&gt;
&lt;li&gt;Go programming&lt;&#x2F;li&gt;
&lt;li&gt;Java programming&lt;&#x2F;li&gt;
&lt;li&gt;A couple of non-fiction books, two of them about startups&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;One of the achievements I am particularly proud of is reading the entire
&quot;&lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;http:&#x2F;&#x2F;www.brendangregg.com&#x2F;sysperfbook.html&quot;&gt;Systems Performance: Enterprise and the
Cloud&lt;&#x2F;a&gt;&quot; by Brendan Gregg, in a
single weekend!&lt;&#x2F;p&gt;
&lt;h3 id=&quot;new-personal-library&quot;&gt;New Personal Library&lt;&#x2F;h3&gt;
&lt;p&gt;Speaking of reading, one of the things that I really missed the most after
moving out of Egypt is my personal library. I had to take only a small portion
of it with me. But I managed to grow this portion into a little library over the
past year and 2 months. I have expanded both the hard copy books, my Kindle book
collection, and ebooks from other sources like Packt Publishing.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;mosab.co.uk&#x2F;blog&#x2F;2018-state-of-the-union&#x2F;small-library-berlin.jpg&quot; alt=&quot;My small library in Berlin&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;h3 id=&quot;the-year-of-finished-online-courses&quot;&gt;The year of “Finished” Online Courses&lt;&#x2F;h3&gt;
&lt;p&gt;For the past few years, I have always started, but not finished, a lot of online
courses and MOOCs. This year, however, I managed to start and actually finish
more than 15 courses, on platforms like &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;see.stanford.edu&#x2F;&quot;&gt;Stanford’s Engineering
Everywhere&lt;&#x2F;a&gt;,
&lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.pluralsight.com&#x2F;&quot;&gt;PluralSight&lt;&#x2F;a&gt;,
&lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.educative.io&#x2F;&quot;&gt;Educative&lt;&#x2F;a&gt;, &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.udemy.com&#x2F;&quot;&gt;Udemy&lt;&#x2F;a&gt;, and
even some Youtube playlists for courses by MIT, Waterloo, &amp;amp; Carnegie Mellon
universities. You can find some of the interesting ones listed on my homepage.
It is worth noting that not all the courses on my &lt;a href=&quot;&#x2F;resources&#x2F;&quot;&gt;resources
page&lt;&#x2F;a&gt; I have finished yet, but I found
interesting enough to share with others.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;technologies-and-skills&quot;&gt;Technologies and Skills&lt;&#x2F;h3&gt;
&lt;p&gt;In 2018, I have acquired some completely new technical skills&#x2F;technologies, as
well as worked on improving some existing ones.&lt;&#x2F;p&gt;
&lt;p&gt;The list of new technologies include:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Golang&lt;&#x2F;li&gt;
&lt;li&gt;Java&lt;&#x2F;li&gt;
&lt;li&gt;Spring Framework&lt;&#x2F;li&gt;
&lt;li&gt;Vert.x Framework&lt;&#x2F;li&gt;
&lt;li&gt;Terraform&lt;&#x2F;li&gt;
&lt;li&gt;MongoDB&lt;&#x2F;li&gt;
&lt;li&gt;Redis&lt;&#x2F;li&gt;
&lt;li&gt;Kafka&lt;&#x2F;li&gt;
&lt;li&gt;Aerospike&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;The technologies and skills I was keen on improving include:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Linux internals, linux administration and linux troubleshooting&lt;&#x2F;li&gt;
&lt;li&gt;Python&lt;&#x2F;li&gt;
&lt;li&gt;PHP&lt;&#x2F;li&gt;
&lt;li&gt;Bash&lt;&#x2F;li&gt;
&lt;li&gt;Docker&lt;&#x2F;li&gt;
&lt;li&gt;Docker Swarm&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;pypi-package&quot;&gt;PyPI Package&lt;&#x2F;h3&gt;
&lt;p&gt;Towards the end of 2018, I published a silly Python package:
&lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;pypi.org&#x2F;project&#x2F;dir2html&#x2F;&quot;&gt;dir2html&lt;&#x2F;a&gt;. The package converts a folder of
images, into an HTML album using a Bootstrap template. Here is an example of how
it looks like after the album has been generated: &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;bitmoji.mosab.co.uk&quot;&gt;Mosab’s Bitmoji
Album&lt;&#x2F;a&gt;. There is a list of improvements and
features to be added to the project, but they are not the top priority.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;job-interviews&quot;&gt;Job Interviews&lt;&#x2F;h3&gt;
&lt;p&gt;Boy did I have tons of interviews in 2018! Before leaving Egypt, I was targeting
to move to London, and if that didn’t work, I had Amsterdam as a backup plan. So
in 2017, I did a lot of interviews for companies in both cities, as well as a
couple of stray interviews for companies in other cities like Paris. When the
first round didn’t yield a job offer in either, I started to believe that those
companies required a significantly higher experience than I had at the time. The
companies included Booking.com, Facebook, and Criteo Labs. Of course, all of
them dealt with insanely high amounts of traffic and required a very deep
understanding of more than just programming since I was also looking to switch
to a Site Reliability Engineering role at the time. I have worked in startups
most of my career and wanted to work with big companies, but it seemed I had to
up my game first before trying again.&lt;&#x2F;p&gt;
&lt;p&gt;In order to acquire this experience, I decided to start targeting companies in
between and started looking into other geographical locations like Germany,
until I landed a job at an adtech company in Berlin and worked on projects like
the mentioned above. I set a goal for the year to see whether Germany would be
where my family and I decide to settle. Turns out, Germany is not for me for
reasons that can be detailed in another future post, maybe. With that
conviction, I set on a new round of interviews again with Facebook, Booking, and
other companies, Mainly in London and Amsterdam again. There was one exception
of N26, an amazing bank of the future that is located in Berlin. I also had
interviews with Google for the same role.&lt;&#x2F;p&gt;
&lt;p&gt;The interview round yielded two offers, one from Booking, and one from a very
promising fintech startup in London, which I accepted. Both offers were decent
and choosing between them was a tough thing to do.&lt;&#x2F;p&gt;
&lt;p&gt;I did not pass Facebook and Google interviews, but I did learn a lot. In
particular, I was in a way better shape for the second facebook interview than
the one I had in 2017, and I feel confident I am close to passing it. The
Facebook interviews were for the Production Engineering role, which is -in the
words of a dear Production Engineer &amp;amp; friend- a software engineer + a systems
engineer + a networks engineer. Those interviews are really tough.&lt;&#x2F;p&gt;
&lt;p&gt;But at the moment, I am preparing to move to London, finally! And as exhausting
as the move is, even though we have not yet got the rest of the visas, it is
also extremely exciting!&lt;&#x2F;p&gt;
&lt;h3 id=&quot;ielts-test&quot;&gt;IELTS Test&lt;&#x2F;h3&gt;
&lt;p&gt;As part of the visa process for the UK, I had to take an English language test,
IELTS short for The International English Language Testing System. Ironically
enough, I didn’t find a suitable appointment in Germany, and the version of the
test that is approved by the UKVI (United Kingdom Visa and Immigration) is only
conducted in Dusseldorf, Germany, which is a 4 hours trip, or a one hour flight
from Berlin where I live. I looked for appointments in other cities, like
Amsterdam, Paris, and London, since my short stay visa was still valid. I ended
up taking the test in London.&lt;&#x2F;p&gt;
&lt;p&gt;The score I got was an overall band of 7, which translates to a C1 level in the
Common European Framework of Reference for languages, or CEFR for short. Not
bad, I guess, but I hoped to score better. Most importantly, it satisfies the UK
visa requirements, so I can improve that later.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;personal-stuff&quot;&gt;Personal Stuff&lt;&#x2F;h2&gt;
&lt;h3 id=&quot;cities-visited&quot;&gt;Cities Visited&lt;&#x2F;h3&gt;
&lt;p&gt;In 2018, I visited London 3 times, twice for interviews, and once to take the
IELTS exam. The city never ceases to amaze me. I am deeply in love with it. In
one of the trips, I visited the Museum of Science where I saw parts of the
Apollo mission -among other things- that was absolutely mesmerizing, had fish
and chips at “Sherlock” restaurant in Baker Street, had Egyptian pies, and
overall great times.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;mosab.co.uk&#x2F;blog&#x2F;2018-state-of-the-union&#x2F;sherlock-fish-and-chips.jpg&quot; alt=&quot;Sherlock fish and chips restaurant, Baker Street&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;p&gt;There was also a magical weekend that was well spent in Vienna, Austria. A
friend of mine was visiting another country in Europe, and we spontaneously
agreed to meet in Vienna for a weekend. A friend of his was amazing and gave us
shelter at his house, and took great care of us during the entire visit.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;mosab.co.uk&#x2F;blog&#x2F;2018-state-of-the-union&#x2F;vienna-party.jpg&quot; alt=&quot;A party in Vienna, Austria&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;p&gt;During the 4 days trip to Amsterdam for the second interview at Booking, I took
some time to meet some friends in Amsterdam. I also visited Haarlem since it is
a popular residential place for families and met another friend living there who
took me on a tour of the city. The Netherlands is always a delight to visit.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;mosab.co.uk&#x2F;blog&#x2F;2018-state-of-the-union&#x2F;booking-office-view.jpg&quot; alt=&quot;The amazing view from one of Booking.com’s offices&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;h3 id=&quot;first-tax-declaration&quot;&gt;First Tax Declaration!&lt;&#x2F;h3&gt;
&lt;p&gt;In Egypt, the situation is so messed up that many companies do not report the
actual salaries of their employees in order to skip paying some of the tax and
social insurance money. Since employees are not required, nor have the incentive
to declare their income for tax purposes, most companies get away with it. Most
of the companies I worked with were on the law-abiding side, but still, I
personally did not have to declare my income for the tax authorities. This has
changed in Germany. Last year was the first year I file my taxes, and I even got
some refunds! The refunds didn’t last long as they were used to fund my family’s
visit to Egypt a few months after they arrived in Germany, but still, that was a
great thing to happen.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;first-fine&quot;&gt;First Fine!&lt;&#x2F;h3&gt;
&lt;p&gt;In the first few months, I was experimenting with public transportation tickets
in order to decide what was best for me. I decided on the second month that I
will start buying monthly tickets until I figured out how to move forward. One
day, 3months into buying monthly tickets, I hopped into the underground, and a
few inspectors boarded the train. When the inspector came to me, I pulled out my
monthly ticket, the inspector looked at it and started speaking in German. I was
confused. No inspector ever spoke before, except to maybe say &quot;Danke schön&quot;,
which mean &quot;Thank you&quot;. Then I realized the ticket had expired &lt;strong&gt;THE DAY
BEFORE!&lt;&#x2F;strong&gt; I had to pay a fine of 63 euros. That day I signed up for the annual
card in order to avoid this situation in the future, and they charge my bank
account every month without requiring me to intervene.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;new-laptop-sticker&quot;&gt;New Laptop Sticker&lt;&#x2F;h3&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;mosab.co.uk&#x2F;blog&#x2F;2018-state-of-the-union&#x2F;2018-laptop-stickers.jpg&quot; alt=&quot;My 2018 laptop sticker collection&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;p&gt;This year, I bought a new personal laptop, and of course, needed some stickers
to decorate it. I bought some stickers from Sticker Mule and got others from
meetups. I am happy with the current status, but I am looking forward to adding
new stickers to the collections.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;cooking-adventures&quot;&gt;Cooking Adventures&lt;&#x2F;h3&gt;
&lt;p&gt;The Germans have a really poor taste in food and most of the restaurants are
“Germanized”, thus most of the food experience in Germany isn’t something to
look forward to. Given that I finally started having some work&#x2F;life balance, I
started looking for recipes online and trying my luck with cooking. The majority
of the recipes I cook come from Asian cuisines because I believe they know how
to eat best. I spend a lot of time searching for a recipe that I can actually
follow, which is an exhausting task, then it is easy getting the ingredients
from the supermarkets around. Sometimes, I have to go to ethnic stores to buy
specific spices or herbs, but overall the ingredients abundance situation is way
better than it was back in Egypt. You can find some pictures of the recipes I
cooked on my &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.instagram.com&#x2F;mos3abof&quot;&gt;Instagram account&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;our-lovely-neighbours&quot;&gt;Our Lovely Neighbours&lt;&#x2F;h3&gt;
&lt;p&gt;The first two months I was in Berlin, I was assigned a temporary guest house to
stay in until I found a more permanent accommodation for my family and myself. A
lot of friends recommended a company that rented furnished apartments, and after
a few calls and emails which the HR helped me with, I got the apartment. At this
point, my wife was still in Cairo. She was communicating with one of her friends
who turns out lives in the same exact building we are moving into! That was such
a great coincidence, and we had a great year together. They got our backs in
countless occasions, often on short notice. Thank you, neighbours&#x2F;friends!&lt;&#x2F;p&gt;
&lt;h3 id=&quot;a-friend-visited-from-egypt&quot;&gt;A Friend Visited from Egypt&lt;&#x2F;h3&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;mosab.co.uk&#x2F;blog&#x2F;2018-state-of-the-union&#x2F;osama-shoenefeld.jpg&quot; alt=&quot;Picking Osama, on the right, from Schönefeld airport&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;p&gt;In 2018, my friend Osama visited me from Egypt as part of a Euro-trip he had.
Unfortunately, we coudln’t spend as much time together as we hoped to because of
all the interviews I had coinciding with the visit. Let’s see what the future
holds.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;amazing-new-friends&quot;&gt;Amazing New Friends&lt;&#x2F;h3&gt;
&lt;p&gt;Throughout the past year, I got to know some amazing new friends. I also got to
spend a lot more time with old friends I barely met back in Egypt. Some of them
I got the privilege of working with them, either in the same company, or the
same team. For that, I am ever thankful. I will miss them a lot after moving
out.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;adam-school-and-the-german-language&quot;&gt;Adam, School and The German Language&lt;&#x2F;h3&gt;
&lt;p&gt;My son, Adam, was afraid at first not being able to speak German and how that
will affect his relationship with his colleagues at school. Turns out, he
learned the fastest of us all and became very fluent in German. He especially
enjoys the playgrounds that seem to be everywhere in Berlin. That’s not the case
in Egypt, where you have to buy very expensive memberships in exclusive clubs in
order to have someplace for your kids to play. Adam acquired a lot of friends,
and he is very happy at school.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;health-adventures&quot;&gt;Health Adventures&lt;&#x2F;h3&gt;
&lt;p&gt;The year 2018 had a lot of health-related stories. I had a tooth removed,
leaving a big gap in my mouth. I had a surgery to remove some extra skin that
looked suspicious but turned out to be nothing serious. I also had my first ever
ambulance ride when I suspected having a blood clot because I travelled to
London a few days after the surgery. I was held in the hospital for a few hours
but was cleared shortly after.&lt;&#x2F;p&gt;
&lt;p&gt;But that’s nothing compared with the two times my daughter, Sofia, had us rush
her into the ER. The first was a few days after they have arrived in Berlin, on
the day we were supposed to register them. She fell off the bed and hit her head
then threw up, which is a sign of a potential concussion. We immediately
cancelled the appointment and went to the first hospital that appeared on Google
maps.&lt;&#x2F;p&gt;
&lt;p&gt;The second time was when she decided she wanted a just-poured cup of tea and
grabbed it from the table very quickly leading it to spill on her arm. She got a
second-degree burn that we are still treating, but she has passed the danger
zone, and feels no pain, thank God!&lt;&#x2F;p&gt;
&lt;p&gt;Overall, I admire the health care system in Germany and most European countries,
although, sometimes you really have to wait to get some care.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;chess&quot;&gt;Chess!&lt;&#x2F;h3&gt;
&lt;p&gt;I started &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.chess.com&#x2F;member&#x2F;mos3abof&quot;&gt;playing chess online&lt;&#x2F;a&gt;, after
so many years of not doing so. I finished the year with a 900 score, and I
intend to continue playing this year.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;new-year-s-eve-fireworks&quot;&gt;New Year’s Eve Fireworks&lt;&#x2F;h3&gt;
&lt;p&gt;My family and I have attended two New Year’s Eve fireworks nights. Most people
living in Berlin complain about how loud the noise is, but given that I have
spent many days on the streets protesting in Egypt’s 2011 revolution, in the
midst of real bullets fired at us, tear gas bombs, and other stuff, the
fireworks noise wasn’t much to handle. Adam enjoyed it very much though both
years. Sofia enjoyed it the first time but was absolutely terrified the second
time that Amira had to stay home with her, while I accompanied Adam on the
street.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;things-i-miss-in-egypt&quot;&gt;Things I Miss in Egypt&lt;&#x2F;h3&gt;
&lt;p&gt;A lot of my friends here kept telling me that by the end of the year I will miss
Egypt again. Truth is, I have not. Not even a little. I only miss very few
things there:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;My brothers, and few members of my family, and my wife’s family&lt;&#x2F;li&gt;
&lt;li&gt;A few friends from work and otherwise&lt;&#x2F;li&gt;
&lt;li&gt;A few restaurants&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;Many of my friends say the weather here is gloomy, but the weather here is one
of the things I like, and of the reasons I moved here.&lt;&#x2F;p&gt;
&lt;p&gt;I do not feel homesick, and I don’t think I will soon either.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;the-next-year&quot;&gt;The Next Year&lt;&#x2F;h2&gt;
&lt;p&gt;We are only a few weeks into 2019, and a lot is going on already! My family and
I are preparing to move to London where I will join a very promising fintech
startup in the capacity of a Site Reliability Engineer. It is going to be a
challenging yet an exciting year, and I hope it goes well without any unwanted
surprises. I am excited!&lt;&#x2F;p&gt;
</description>
      </item>
      <item>
          <title>How To Install Firefox On Debian Jessie</title>
          <pubDate>Tue, 10 May 2016 00:00:00 +0000</pubDate>
          <author>Unknown</author>
          <link>https://mosab.co.uk/blog/how-to-install-firefox-on-debian-jessie/</link>
          <guid>https://mosab.co.uk/blog/how-to-install-firefox-on-debian-jessie/</guid>
          <description xml:base="https://mosab.co.uk/blog/how-to-install-firefox-on-debian-jessie/">&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;mosab.co.uk&#x2F;blog&#x2F;how-to-install-firefox-on-debian-jessie&#x2F;firefox-iceweasel-debian.png&quot; alt=&quot;logo&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;p&gt;&lt;em&gt;Iceweasel&lt;&#x2F;em&gt; is great, but I prefer &lt;em&gt;Firefox&lt;&#x2F;em&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;A while back I decided to go back to my favorite linux distribution, &lt;em&gt;Debian&lt;&#x2F;em&gt;.
The current stable release of &lt;em&gt;Debian&lt;&#x2F;em&gt; is code named &lt;em&gt;Jessie&lt;&#x2F;em&gt;, and this is what
I have installed on my laptop at the time of writing this post.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;em&gt;Mozilla&lt;&#x2F;em&gt; has three famous desktop applications. Those applications are Firefox,
Thunderbird, and &lt;em&gt;Seamonkey&lt;&#x2F;em&gt;. But Debian has been shipping those products
re-branded as &lt;em&gt;Iceweasel&lt;&#x2F;em&gt;, &lt;em&gt;Icdeodove&lt;&#x2F;em&gt;, and &lt;em&gt;Iceape&lt;&#x2F;em&gt;, respectively. &lt;em&gt;Debian&lt;&#x2F;em&gt;
does this as a workaround for some incompatibilities between the Debian Free
Software Guidelines and Mozilla’s trademark usage policy, and I think something
related to the Mozilla logos licensing as well. I am not aware of the details of
the conflicts, and I would like to read about it some other time.&lt;&#x2F;p&gt;
&lt;p&gt;For now, I wanted to install &lt;em&gt;Firefox&lt;&#x2F;em&gt; instead of, or alongside, &lt;em&gt;Iceweasel&lt;&#x2F;em&gt; on my
laptop. &lt;em&gt;Iceweasel&lt;&#x2F;em&gt; is great, but I was having a few problems. One example would
be the different User Agent information, which causes some problems while using
services on the internet, like Medium. Medium does not recognize my browser to be
supported, and thus disables the option of writing stories if I am browsing it
using &lt;em&gt;Iceweasel&lt;&#x2F;em&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;I did a quick &lt;em&gt;Google&lt;&#x2F;em&gt; search on how to install &lt;em&gt;Firefox&lt;&#x2F;em&gt; on &lt;em&gt;Debian Jessie&lt;&#x2F;em&gt;,
and a majority of the results suggested adding repositories from &lt;em&gt;Ubuntu&lt;&#x2F;em&gt;
packages hosted on &lt;em&gt;Sourceforge&lt;&#x2F;em&gt;. I had two major problems with that:&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Problem 1:&lt;&#x2F;strong&gt; I don’t like Sourceforge. At all. For various reasons, but that’s
a story for another time.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;strong&gt;Problem 2:&lt;&#x2F;strong&gt; I don’t like the idea of adding the repositories of another
distro to my current setup. Does not seem like a neat solution.&lt;&#x2F;p&gt;
&lt;p&gt;So I kept searching until I found this &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;http:&#x2F;&#x2F;mozilla.debian.net&#x2F;&quot;&gt;“Debian Mozilla team”&lt;&#x2F;a&gt; page. I
knew I found my desired solution.&lt;&#x2F;p&gt;
&lt;p&gt;Below are the steps I followed from that page to get &lt;em&gt;Firefox&lt;&#x2F;em&gt; installed on
&lt;em&gt;Debian Jessie&lt;&#x2F;em&gt;.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;step-1-add-mozilla-archive-to-apt-repositories&quot;&gt;Step 1: Add Mozilla Archive to APT Repositories&lt;&#x2F;h2&gt;
&lt;p&gt;Open a terminal as root, and add a new file to &lt;code&gt;&#x2F;etc&#x2F;apt&#x2F;sources.list.d&#x2F;&lt;&#x2F;code&gt;
directory:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;shell&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-shell &quot;&gt;&lt;code class=&quot;language-shell&quot; data-lang=&quot;shell&quot;&gt;&lt;span&gt;touch &#x2F;etc&#x2F;apt&#x2F;sources.list.d&#x2F;debian-mozilla.list
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Open the file using your favorite text editor, mine happens to be vim, and add
the following line to it:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;plaintext&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-plaintext &quot;&gt;&lt;code class=&quot;language-plaintext&quot; data-lang=&quot;plaintext&quot;&gt;&lt;span&gt;deb http:&#x2F;&#x2F;mozilla.debian.net&#x2F; jessie-backports firefox-release
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h2 id=&quot;step-2-add-the-mozilla-archive-key&quot;&gt;Step 2: Add the Mozilla Archive Key&lt;&#x2F;h2&gt;
&lt;p&gt;This line adds &lt;code&gt;mozilla.debian.net&lt;&#x2F;code&gt; archive to your list of archives. Since the
packages at &lt;code&gt;mozilla.debian.net&lt;&#x2F;code&gt; are signed, running &lt;code&gt;apt-get update&lt;&#x2F;code&gt; now will
spit out a key not found error. To add the key you need to download the
&lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;http:&#x2F;&#x2F;mozilla.debian.net&#x2F;pkg-mozilla-archive-keyring_1.1_all.deb&quot;&gt;pkg-mozilla-archive-keyring&lt;&#x2F;a&gt;
package, and install it. The package requires that &lt;code&gt;debian-keying&lt;&#x2F;code&gt; package be
installed.&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;shell&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-shell &quot;&gt;&lt;code class=&quot;language-shell&quot; data-lang=&quot;shell&quot;&gt;&lt;span&gt;cd ~&#x2F;
&lt;&#x2F;span&gt;&lt;span&gt;wget mozilla.debian.net&#x2F;pkg-mozilla-archive-keyring_1.1_all.deb
&lt;&#x2F;span&gt;&lt;span&gt;dpkg -i pkg-mozilla-archive-keyring_1.1_all.deb
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h2 id=&quot;step-3-install-firefox&quot;&gt;Step 3: Install Firefox&lt;&#x2F;h2&gt;
&lt;p&gt;Now it is time to update the archives and install &lt;em&gt;Firefox&lt;&#x2F;em&gt;:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;shell&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-shell &quot;&gt;&lt;code class=&quot;language-shell&quot; data-lang=&quot;shell&quot;&gt;&lt;span&gt;apt-get update
&lt;&#x2F;span&gt;&lt;span&gt;apt-get install -t jessie-backports firefox
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;And now you have &lt;em&gt;Firefox&lt;&#x2F;em&gt; installed.&lt;&#x2F;p&gt;
&lt;p&gt;Note that &lt;em&gt;Iceweasel&lt;&#x2F;em&gt; is also still installed, and they both will use the same
settings and configurations. When I started Firefox, it had all the add-ons and
settings and even the tabs that were opened in &lt;em&gt;Iceweasel&lt;&#x2F;em&gt;, all preserved.&lt;&#x2F;p&gt;
&lt;p&gt;Check the &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;http:&#x2F;&#x2F;mozilla.debian.net&#x2F;&quot;&gt;mozilla.debian.net&lt;&#x2F;a&gt; page for various
combinations of &lt;em&gt;Debian&lt;&#x2F;em&gt; release, &lt;em&gt;Mozilla&lt;&#x2F;em&gt; desktop application you want to
install, and the version of the &lt;em&gt;Mozilla&lt;&#x2F;em&gt; desktop application you want
installed.&lt;&#x2F;p&gt;
</description>
      </item>
      <item>
          <title>New Version of Power Close</title>
          <pubDate>Mon, 09 May 2016 12:00:00 +0000</pubDate>
          <author>Unknown</author>
          <link>https://mosab.co.uk/blog/new-version-of-firefox-power-close/</link>
          <guid>https://mosab.co.uk/blog/new-version-of-firefox-power-close/</guid>
          <description xml:base="https://mosab.co.uk/blog/new-version-of-firefox-power-close/">&lt;p&gt;New website, new icon, and improvements for the tab addict Firefox add-on&lt;&#x2F;p&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;mosab.co.uk&#x2F;blog&#x2F;new-version-of-firefox-power-close&#x2F;firefox-mosaic.jpg&quot; alt=&quot;firefox-header&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;a-brief-history&quot;&gt;A Brief History&lt;&#x2F;h2&gt;
&lt;p&gt;I have recently noticed that Power Close, my Firefox add-on, has reached a 1.5 K
downloads milestone, which is way more than what I anticipated when I first
created it. It was a very small hack for a very personal itch I have, and I
never thought this many people had the same problem.&lt;&#x2F;p&gt;
&lt;p&gt;The first version published version, 0.2.1, was officially released on September
28th, 2014, on Mozilla’s add-on portal, and a couple days before that on GitHub.
A few bug fixes and little improvements were released since that date, and then
I got busy with my life and work.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;mosab.co.uk&#x2F;blog&#x2F;new-version-of-firefox-power-close&#x2F;stats.png&quot; alt=&quot;download and usage stats&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;what-s-new&quot;&gt;What’s New&lt;&#x2F;h2&gt;
&lt;p&gt;Earlier this month, a new version 0.5.2 of the add-on was released. Here is a
quick overview of the changes that took place.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;new-icon&quot;&gt;New Icon&lt;&#x2F;h3&gt;
&lt;p&gt;In older versions of the add-on, the logo used to be one of the icons designed
by &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;http:&#x2F;&#x2F;www.freepik.com&#x2F;&quot;&gt;Freepik&lt;&#x2F;a&gt; from &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;http:&#x2F;&#x2F;www.flaticon.com&#x2F;&quot;&gt;Flat
Icon&lt;&#x2F;a&gt;, that was licensed under &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;http:&#x2F;&#x2F;creativecommons.org&#x2F;licenses&#x2F;by&#x2F;3.0&#x2F;&quot;&gt;CC-BY
License&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;mosab.co.uk&#x2F;blog&#x2F;new-version-of-firefox-power-close&#x2F;old-logo.png&quot; alt=&quot;Old version of the icon&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;p&gt;In this release, the icon used for the logo and the toolbar button is a mash of
two icons from Google’s &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;design.google.com&#x2F;icons&#x2F;&quot;&gt;Material Design
Icons&lt;&#x2F;a&gt; that are published as an open source
project under the &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;creativecommons.org&#x2F;licenses&#x2F;by&#x2F;4.0&#x2F;&quot;&gt;CC-By License&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;mosab.co.uk&#x2F;blog&#x2F;new-version-of-firefox-power-close&#x2F;new-logo.png&quot; alt=&quot;The new icon used&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;h3 id=&quot;selection-context-menu-option&quot;&gt;Selection Context Menu Option&lt;&#x2F;h3&gt;
&lt;p&gt;In previous versions of the add-on, the user had to click in a non-interactive
part of the page to see the &lt;em&gt;&quot;close all tabs from this domain&quot;&lt;&#x2F;em&gt; context menu
item. This caused usability issues because the option didn’t appear if you
right click on the page while having a portion of the text selected.&lt;&#x2F;p&gt;
&lt;p&gt;Now the same option is added to the “Selection Context Menu”, so now the user
can still find this option in the context menu even if they have previously
selected some text.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;switched-to-the-new-firefox-add-on-sdk&quot;&gt;Switched to The New Firefox Add-on SDK&lt;&#x2F;h3&gt;
&lt;p&gt;The previous versions of the add-on were developed using the now deprecated
“cfx” sdk provided by Mozilla for Firefox add-on developers.&lt;&#x2F;p&gt;
&lt;p&gt;This new version is updated to make use of the new SDK named “jpm”.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;new-website&quot;&gt;New website&lt;&#x2F;h3&gt;
&lt;p&gt;I have also registered a domain name for the add-on, and moved it from the
sub-domain under my personal website power-close.mos3abof.com, where it used to
live, to &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;power-close.com&quot;&gt;power-close.com&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;mosab.co.uk&#x2F;blog&#x2F;new-version-of-firefox-power-close&#x2F;website-facelift.png&quot; alt=&quot;website face lift&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;p&gt;The website was given a face lift to make it more usable, but this is an early
release with new enhancements and features in the backlog. The website is
hosted on &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.dreamhost.com&#x2F;r.cgi?1017456&quot;&gt;Dreamhost&lt;&#x2F;a&gt;, and is HTTPs
enabled using a certificate issued from &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;letsencrypt.org&#x2F;&quot;&gt;Let’s
Encrypt&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;newsletter&quot;&gt;Newsletter&lt;&#x2F;h3&gt;
&lt;p&gt;I am also starting a newsletter for a better channel of communication with the
users, where I consider it a matter of principal not to spam the subscribers
with unnecessary emails.&lt;&#x2F;p&gt;
&lt;p&gt;You can sign up for the newsletter on the website:
&lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;power-close.com&quot;&gt;power-close.com&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;social-media-presence&quot;&gt;Social Media Presence&lt;&#x2F;h3&gt;
&lt;p&gt;I have also started a &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;http:&#x2F;&#x2F;facebook.com&#x2F;power.close.addon&quot;&gt;Facebook page&lt;&#x2F;a&gt; and
created a &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;http:&#x2F;&#x2F;twitter.com&#x2F;powercloseaddon&quot;&gt;Twitter account&lt;&#x2F;a&gt; for the add-on.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;what-s-next&quot;&gt;What’s Next&lt;&#x2F;h3&gt;
&lt;p&gt;The downloads number has really caught me by surprise, mainly because I have not
put any effort to marketing it. This inspired me to dedicate more effort into
the project to make it more useful for the ones who are already using it.&lt;&#x2F;p&gt;
&lt;p&gt;This also inspired me to launch a side experiment by reading and learning about
growth hacking, while applying what I learn on Power Close, and documenting my
findings along the way.&lt;&#x2F;p&gt;
&lt;p&gt;I am still not 100% sure about the game plan for this experiment. If you have
any tips, hints, or advice I would love to hear&#x2F;read it.&lt;&#x2F;p&gt;
&lt;p&gt;Or you can click on the button below and add Power Close to your firefox browser
now!&lt;&#x2F;p&gt;
&lt;p&gt;&lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;power-close.com&quot;&gt;&lt;img src=&quot;https:&#x2F;&#x2F;mosab.co.uk&#x2F;blog&#x2F;new-version-of-firefox-power-close&#x2F;add-to-firefox.png&quot; alt=&quot;Get the power&quot; &#x2F;&gt;&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
</description>
      </item>
      <item>
          <title>Power Close, My First Firefox Addon</title>
          <pubDate>Sun, 28 Sep 2014 12:00:00 +0000</pubDate>
          <author>Unknown</author>
          <link>https://mosab.co.uk/blog/firefox-power-close/</link>
          <guid>https://mosab.co.uk/blog/firefox-power-close/</guid>
          <description xml:base="https://mosab.co.uk/blog/firefox-power-close/">&lt;p&gt;I open a lot of tabs on firefox, and I mean A LOT! I was searching for addons to
help me close tabs as fast as I open them so that I would keep the rate of open
tabs steady. The best I found was something that closed duplicate tabs.&lt;&#x2F;p&gt;
&lt;p&gt;I usually have a lot of tabs from the same domain name open most of the time
when I am researching something, or even when I am surfing facebook. So I
thought it would be cool if I could close tabs belonging to a specific domain
name, and not just duplicate.&lt;&#x2F;p&gt;
&lt;p&gt;I didn&#x27;t find it, so I created it. Pretty basic, no optimization whatsoever, but
&lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;addons.mozilla.org&#x2F;en-US&#x2F;firefox&#x2F;addon&#x2F;firefox-power-close&#x2F;developers&quot;&gt;here it is&lt;&#x2F;a&gt; and here is the &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;mos3abof&#x2F;firefox-power-close&quot;&gt;code&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;I submitted it yesterday for review by Mozilla, and today I got an email stating
that the addon has undergone full review :)&lt;&#x2F;p&gt;
&lt;h2 id=&quot;how-to-use-it&quot;&gt;How to use it&lt;&#x2F;h2&gt;
&lt;p&gt;After installation, this icon will appear as a button in your browser:&lt;&#x2F;p&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;mosab.co.uk&#x2F;blog&#x2F;firefox-power-close&#x2F;icon.png&quot; alt=&quot;Firefox Power Close Addon Button&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Press on it, and an input field will appear. Write the keyword or domain name in
it and press enter, and voila!&lt;&#x2F;p&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;d262ilb51hltx0.cloudfront.net&#x2F;max&#x2F;899&#x2F;1*IRXZxyKWj1vd4DpaT1Fl8g.png&quot; alt=&quot;Screenshot&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;h2 id=&quot;what-s-next-for-power-close&quot;&gt;What’s next for &quot;Power Close&quot;&lt;&#x2F;h2&gt;
&lt;p&gt;There are a couple of ideas for future features :&lt;&#x2F;p&gt;
&lt;p&gt;&lt;em&gt;Context menu shortcut:&lt;&#x2F;em&gt; Adding a context menu entry to close all tabs from
current selected tab’s domain&lt;&#x2F;p&gt;
&lt;p&gt;&lt;em&gt;Autocomplete:&lt;&#x2F;em&gt; I am planning on implementing autocomplete so you don’t have to
type full domain names.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;em&gt;List current open domains:&lt;&#x2F;em&gt; a feature to list currently open domain names
listed by the count of open tabs from every domain in a descending.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;em&gt;IDN domain names support:&lt;&#x2F;em&gt; currently the addon does not support domain names
using non English letters and numbers. I am planning on adding this support at
some point or another.&lt;&#x2F;p&gt;
&lt;p&gt;Other closing options would be thought of as well. Feel free to suggest ideas.&lt;&#x2F;p&gt;
</description>
      </item>
      <item>
          <title>Heading For The Dark Ages!</title>
          <pubDate>Mon, 18 Aug 2014 04:00:00 +0000</pubDate>
          <author>Unknown</author>
          <link>https://mosab.co.uk/blog/power-grid-load-graph/</link>
          <guid>https://mosab.co.uk/blog/power-grid-load-graph/</guid>
          <description xml:base="https://mosab.co.uk/blog/power-grid-load-graph/">&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;[tl;dr? Check the graph at the end of the post]&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;In Egypt we are having an electricity crisis. It started in Mubrak&#x27;s presidency,
the dude ousted by the great Jan 2011 Revolution. After his removal, the crises
started to deepen.&lt;&#x2F;p&gt;
&lt;p&gt;Morsi came to office as the president in the elections right after the
revolution, and in his rule the crisis took an even worse turn. It became normal
that electricity cuts off once a day for an hour. That was one of the main
reasons people revolted against Morsi, and the military seized the opportunity
and removed him from office and put the supreme court&#x27;s president in his place
for a year. Power outages were slightly improved right after ousting Morsi, but
then it gradually was becoming worse and worse.&lt;&#x2F;p&gt;
&lt;p&gt;Marshall Sisi won the next presidential elections, he is the current president
of Egypt and now we are having 5 or more power outages a day!!! This dude is a
bloody savage and a mass murderer and if there was any justice in the world he
would be considered a war criminal, but that&#x27;s a story for another time!&lt;&#x2F;p&gt;
&lt;p&gt;Anyway, things were getting a lot worse without any government official having a
shred of decency to come up and talk to the people about it. Not an apolgy, or a
bit of information of how bad and&#x2F;or how long will this go on. Not a statement
on whatever measures the government put in place to solve this. Not a thing!!&lt;&#x2F;p&gt;
&lt;p&gt;Then I saw &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;http:&#x2F;&#x2F;eg.okfn.org&#x2F;2014&#x2F;08&#x2F;egyptera_current_load&#x2F;&quot;&gt;this post&lt;&#x2F;a&gt; by my
fried &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;http:&#x2F;&#x2F;tarekamr.appspot.com&#x2F;&quot;&gt;Tarek Amr&lt;&#x2F;a&gt;. He wrote that the Egyptian
Electric Utility and Consumer Protection Regulatory Agency (EGYPTERA) has
released an online meter to show the current load status on the Egyptian power
grid. He said that the meter did not provide any way to be processed
programmatically, like an API, and he invited his fellow programmers to try and
do so.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;img src=&quot;http:&#x2F;&#x2F;eg.okfn.org&#x2F;files&#x2F;2014&#x2F;08&#x2F;Screen-Shot-2014-08-06-at-19.59.15-222x300.png&quot; alt=&quot;EGYPTERA Load Meter&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;p&gt;I liked the idea very much, and worked on a &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;http:&#x2F;&#x2F;www.gridstatusnow.com&#x2F;&quot;&gt;web
application&lt;&#x2F;a&gt; that parses the meter data and
provides it as an &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;http:&#x2F;&#x2F;www.gridstatusnow.com&#x2F;status&quot;&gt;API&lt;&#x2F;a&gt; for other
programmers to use, and open sourced &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;mos3abof&#x2F;power-grid-status&quot;&gt;the code&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Unfortunately, EGYPTERA&#x27;s load meter only shows if the power is in the &quot;Safe
Zone&quot;, &quot;Warning Zone&quot; or &quot;Danger Zone&quot;. It also shows the load distribution
throughout the day&#x27;s hours. It does not show any historical data. It does not
show location specific load status. Just a load status on the entire power
network across Egypt!!&lt;&#x2F;p&gt;
&lt;p&gt;After I released the api, I worte another script that used that api to save the
status into a database on my online server withe a timestamp. I collected data
for the past 7 days and a half about the load status every 10 minutes.&lt;&#x2F;p&gt;
&lt;p&gt;When I plotted it using D3js, the output was scary!&lt;&#x2F;p&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;farm6.staticflickr.com&#x2F;5588&#x2F;15061405582_bb8de1c0cc_n.jpg&quot; alt=&quot;Load Distribution Graph&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Each row represents a day, and every block stands for an hour of the day
starting at 12 am and finishing at 12 am the next day.&lt;&#x2F;p&gt;
&lt;p&gt;Load level has a value of three :&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;Danger (represented in red)&lt;&#x2F;li&gt;
&lt;li&gt;Warning (represented in yellow)&lt;&#x2F;li&gt;
&lt;li&gt;Normal (represented in green)&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;You can reach the load distribution graph &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;http:&#x2F;&#x2F;www.gridstatusnow.com&#x2F;history&quot;&gt;here&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;We were heading for the &quot;Dark Ages&quot; figuratively with all that blood spilled and
corrupted governments, corrupted military, corrupted judicial system, corrupted
police and corrupted media. &lt;strong&gt;Now were are heading for the Dark Ages,
LITERALLY!!&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Update 1: The application has been featured on a TV show on Alnahar Alyoum
channel. Ironically the name of the channel means &quot;The Day Light Daily&quot; while we
are in a power crisis. Here is the &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=o2amh54k3eQ&quot;&gt;video link&lt;&#x2F;a&gt;. I have been called by the
program on phone from minute 17 to minute 27.&lt;&#x2F;p&gt;
&lt;p&gt;Update 2: The application now has been moved to its own domain name
(www.gridstatusnow.com) and has been undergoing some UI enhancements for a
better user experience.&lt;&#x2F;p&gt;
</description>
      </item>
      <item>
          <title>My Sublime Text 2 Setup</title>
          <pubDate>Thu, 20 Jun 2013 00:53:00 +0000</pubDate>
          <author>Unknown</author>
          <link>https://mosab.co.uk/blog/my-sublime-text-2-setup/</link>
          <guid>https://mosab.co.uk/blog/my-sublime-text-2-setup/</guid>
          <description xml:base="https://mosab.co.uk/blog/my-sublime-text-2-setup/">&lt;p&gt;I have been suffering for a while with IDEs, and ventured out to see what
options do I have. I ended up using mainly Vim and Sublime for a long while now,
and my life was never easier and I was never happier! In this post however I am
talking about my &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.sublimetext.com&#x2F;&quot;&gt;Sublime Text&lt;&#x2F;a&gt; Setup.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;1-package-control&quot;&gt;1) Package Control&lt;&#x2F;h3&gt;
&lt;p&gt;You don&#x27;t know what sublime is really capable of until you install the &quot;&lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;http:&#x2F;&#x2F;wbond.net&#x2F;sublime_packages&#x2F;package_control&#x2F;&quot;&gt;Package
Control&lt;&#x2F;a&gt;&quot;.&lt;&#x2F;p&gt;
&lt;p&gt;The website describes it as:&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;A full-featured package manager that helps discovering, installing, updating
and removing packages for Sublime Text 2. It features an automatic upgrader
and supports GitHub, Bitbucket and a full channel&#x2F;repository system.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;If you are using Sublime and not using it, STOP READING &amp;amp; NOW GO
&lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;http:&#x2F;&#x2F;wbond.net&#x2F;sublime_packages&#x2F;package_control&#x2F;installation&quot;&gt;INSTALL IT&lt;&#x2F;a&gt;! After that go have a look &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;http:&#x2F;&#x2F;wbond.net&#x2F;sublime_packages&#x2F;package_control&#x2F;usage&quot;&gt;how to use it&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;2-the-packages-i-use&quot;&gt;2) The packages I use&lt;&#x2F;h3&gt;
&lt;p&gt;I have a list of awesome packages I use:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;SublimeLinter&lt;&#x2F;strong&gt; : Uses &quot;lint&quot; programs to highlight lines of code the
linter deems to contain (potential) errors. It also supports highlighting
special annotations (for example: TODO) so that they can be quickly located.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;SideBarEnhancements&lt;&#x2F;strong&gt; : Adds lots of enhancements to default Sublime Text
sidebar. Files and folders.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;GitHubinator&lt;&#x2F;strong&gt; : Allows you to select text in a Sublime Text 2 file, and
see the highlighted lines on GitHub&#x27;s remote repo, if one exists.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Git&lt;&#x2F;strong&gt; : Plugin for some git integration into Sublime Text.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Djaneiro&lt;&#x2F;strong&gt; : Django support for Sublime Text.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;SublimeCodeIntel&lt;&#x2F;strong&gt; : Full-featured code intelligence and smart
autocomplete engine.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;PHP-Twig&lt;&#x2F;strong&gt; : Adds support for &lt;code&gt;.twig&lt;&#x2F;code&gt; template files.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;BracketHilighter&lt;&#x2F;strong&gt; : Matches and highlights a variety of brackets for
better readability.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;SublimeRope&lt;&#x2F;strong&gt; : Adds Python completions and some IDE-like functions to
Sublime Text.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;jQuery&lt;&#x2F;strong&gt; : Provides help with jQuery functions.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;Xdebug&lt;&#x2F;strong&gt; : Xdebug Interface for Sublime Text.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;strong&gt;SublimeREPL&lt;&#x2F;strong&gt; : Helps you run an interpreter inside Sublime Text for
various languages (like Python, Ruby, Shell) and you can configure it to run
others as well.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;To install any of these packages -after installing the Package Control- press
&lt;code&gt;ctrl+shift+p&lt;&#x2F;code&gt; then type &lt;code&gt;install package&lt;&#x2F;code&gt;. A list will appear with all
available packages to your, just click on the package you want and voila!&lt;&#x2F;p&gt;
&lt;p&gt;I highly recommend you watch this video on Youtube : &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;http:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=TZ-bgcJ6fQo&quot;&gt;Perfect Workflow in
Sublime Text 2&lt;&#x2F;a&gt;. It might seem very long, but it is actually divided into 10
minutes chunks -more or less- and it is one of the best resources I have seen
about Sublime.&lt;&#x2F;p&gt;
&lt;p&gt;Happy hacking&#x2F;coding with Sublime :)&lt;&#x2F;p&gt;
</description>
      </item>
      <item>
          <title>Toggl Target: An Open Source Project of My Own</title>
          <pubDate>Mon, 17 Jun 2013 04:00:00 +0000</pubDate>
          <author>Unknown</author>
          <link>https://mosab.co.uk/blog/toggl-target-open-source-project/</link>
          <guid>https://mosab.co.uk/blog/toggl-target-open-source-project/</guid>
          <description xml:base="https://mosab.co.uk/blog/toggl-target-open-source-project/">&lt;p&gt;At our company, &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;http:&#x2F;&#x2F;www.yubb-software.com&quot;&gt;Yubb Software&lt;&#x2F;a&gt;, we track our
working hours using the great time tracker created by the folks at
&lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;http:&#x2F;&#x2F;www.toggl.com&quot;&gt;Toggl&lt;&#x2F;a&gt;, and we have monthly goals that we need to
achieve. I have always had a problem with time management, and this time I
decided I should start working on them.&lt;&#x2F;p&gt;
&lt;p&gt;So I created this small project to calculate how many more hours I should work
to achieve my monthly goals.&lt;&#x2F;p&gt;
&lt;p&gt;This is how the output of this script looks like :&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;plaintext&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-plaintext &quot;&gt;&lt;code class=&quot;language-plaintext&quot; data-lang=&quot;plaintext&quot;&gt;&lt;span&gt;Hi Checking Internet connectivity... Internet seems fine!
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;Trying to connect to Toggl, hang on!
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;So far you have tracked 120.00 hours
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;Business days left till deadline : 7 Total days left till deadline : 10
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;Required working hours for this month : 170
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;To achieve the minimum : you should log 4.00 hours every business day or log
&lt;&#x2F;span&gt;&lt;span&gt;3.00 hours every day
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;To achieve the required : you should log 7.00 hours every business day or log
&lt;&#x2F;span&gt;&lt;span&gt;5.0 hours every day
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;So far you have achieved:
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;70.59% [=================================================--------------|------]
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This information has provided me with a whole new level of awareness of how
productive I am! It is scary, but at the same time it gives you a great
indicator of how good -or bad- you are sticking to your goals and if you need to
have some crunch time or just relax the next weekend.&lt;&#x2F;p&gt;
&lt;p&gt;I then published the script under GPL license V2 on
&lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;mos3abof&#x2F;toggl_target&quot;&gt;Github&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;I got great deal of help from one of my role model software engineers in Egypt,
&lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;http:&#x2F;&#x2F;www.mtayseer.net&#x2F;&quot;&gt;Mohammed Tayseer&lt;&#x2F;a&gt;, making the code more Pythonic. He
also added installation instructions for Windows users, as I don&#x27;t use windows
anymore, and he is now a contributor to the repository on Github.&lt;&#x2F;p&gt;
&lt;p&gt;Today, Monday June 17th, Toggl added a link to my script on their new
documentation in the &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;toggl&#x2F;toggl_api_docs&quot;&gt;Code Examples&lt;&#x2F;a&gt;
section.&lt;&#x2F;p&gt;
&lt;p&gt;My little open source script that uses is the first -and so far the only-
mentioned project in their new API Documentation. Check it on their &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;toggl&#x2F;toggl_api_docs#code-examples&quot;&gt;API
Documentation&lt;&#x2F;a&gt; on Github,
or check the following screenshot :&lt;&#x2F;p&gt;
&lt;p&gt;&lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;http:&#x2F;&#x2F;farm8.staticflickr.com&#x2F;7432&#x2F;9069807810_0084073717_b.jpg&quot;&gt;My little open source script that uses is the first -and so far the only-
mentioned in Toggl&#x27;s API new
Documentation.&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;This really made my day. Thank you Toggl :)&lt;&#x2F;p&gt;
&lt;h3 id=&quot;update-1-friday-june-21st-3-50-pm&quot;&gt;Update 1 : Friday June 21st, 3:50 PM&lt;&#x2F;h3&gt;
&lt;p&gt;I received an email today from someone with the following content :&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;Hi Mosab,&lt;&#x2F;p&gt;
&lt;p&gt;I’m currently making a small Python app that interacts with the toggl API, and
your toggl target script has been helpful in getting me started. I’m using a
modified version of your api.py file, and I’d like to credit you in my project
when I put it on GitHub, but I’m not sure how (I’m rather new to all of this).
Is it sufficient to mention that in the readme or should I leave the line
&quot;#@author Mosab Ahmad [mosab.ahmad@gmail.com][]&quot; at the beginning of the
file?&lt;&#x2F;p&gt;
&lt;p&gt;If you’re interested, it’s an implementation of
&lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;http:&#x2F;&#x2F;blog.sethroberts.net&#x2F;2011&#x2F;05&#x2F;01&#x2F;percentile-feedback-and-productivity&#x2F;&quot;&gt;this&lt;&#x2F;a&gt;
(percentile feedback)&lt;&#x2F;p&gt;
&lt;p&gt;Best&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;I am really glad my code helped someone :)&lt;&#x2F;p&gt;
&lt;h3 id=&quot;update-2-wednesday-jul-10th-11-43-pm&quot;&gt;Update 2 : Wednesday Jul 10th, 11:43 PM&lt;&#x2F;h3&gt;
&lt;p&gt;Seems that my little Toggl Target script is picking up some momentum.&lt;&#x2F;p&gt;
&lt;p&gt;I got this email 45 minutes ago :&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;hi,&lt;&#x2F;p&gt;
&lt;p&gt;you probably have already seen it, but i forked your toggl_target repo.&lt;&#x2F;p&gt;
&lt;p&gt;i just wanted to see how fast i could add reports api support and what data
comes out of there... while doing that i replaced the way the config is loaded
to something similar like django works and loading a config file directly from
a user&#x27;s home dir... and added a setup.py to install everything.&lt;&#x2F;p&gt;
&lt;p&gt;so now there is a separate script to get some reports and an api wrapper for
reports subclassing yours. i also did a little refactoring in your code.&lt;&#x2F;p&gt;
&lt;p&gt;since you seem to plan on writing a separate pytoggle lib i thought some of
that is useful for you... so i wanted to give you an overview of what i
changed and let you know, i probably won&#x27;t do anything more with that.&lt;&#x2F;p&gt;
&lt;p&gt;here is the sauce:&lt;&#x2F;p&gt;
&lt;p&gt;&lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;fdemmer&#x2F;toggl_target&quot;&gt;https:&#x2F;&#x2F;github.com&#x2F;fdemmer&#x2F;toggl_target&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;p&gt;regards,&lt;&#x2F;p&gt;
&lt;p&gt;Florian&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;I am really surprised and humbled by all your contributions, thank you.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;img src=&quot;http:&#x2F;&#x2F;farm4.staticflickr.com&#x2F;3832&#x2F;9067864209_17b3b8d1c8_o.png&quot; alt=&quot;My little open source script Toggl Target in action.&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
</description>
      </item>
      <item>
          <title>Joining Yubb Software</title>
          <pubDate>Fri, 01 Mar 2013 12:00:00 +0000</pubDate>
          <author>Unknown</author>
          <link>https://mosab.co.uk/blog/joining-yubb/</link>
          <guid>https://mosab.co.uk/blog/joining-yubb/</guid>
          <description xml:base="https://mosab.co.uk/blog/joining-yubb/">&lt;p&gt;I am very excited to join &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;http:&#x2F;&#x2F;www.yubb-software.com&quot;&gt;Yubb Software&lt;&#x2F;a&gt;, a
brilliant software development company.&lt;&#x2F;p&gt;
&lt;p&gt;I have worked with the founders and some of the workers there in previous
companies, and I love this group. The project we are working on is challenging,
and the role I am supposed to play is very interesting.&lt;&#x2F;p&gt;
&lt;p&gt;They are working from a co-working space called &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;http:&#x2F;&#x2F;www.district-egypt.com&#x2F;&quot;&gt;The
District&lt;&#x2F;a&gt;, which is even more cool :)&lt;&#x2F;p&gt;
&lt;p&gt;I am looking forward for a bunch of hard working months to come.&lt;&#x2F;p&gt;
</description>
      </item>
      <item>
          <title>Reading Data from Excel Sheets in Python</title>
          <pubDate>Tue, 19 Feb 2013 11:18:00 +0000</pubDate>
          <author>Unknown</author>
          <link>https://mosab.co.uk/blog/reading-data-from-excel-sheets-in-python/</link>
          <guid>https://mosab.co.uk/blog/reading-data-from-excel-sheets-in-python/</guid>
          <description xml:base="https://mosab.co.uk/blog/reading-data-from-excel-sheets-in-python/">&lt;p&gt;On &lt;em&gt;May 22nd 2012&lt;&#x2F;em&gt; I was approached by the official campaign of the presidential
candidate &quot;&lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;http:&#x2F;&#x2F;www.abolfotoh.net&#x2F;&quot;&gt;Abolfotoh&lt;&#x2F;a&gt;&quot;.&lt;&#x2F;p&gt;
&lt;p&gt;They needed help setting up a Google App Engine application.&lt;&#x2F;p&gt;
&lt;p&gt;It was an interactive map that uses Google Maps to plot data about voters and
polling stations.&lt;&#x2F;p&gt;
&lt;p&gt;What they wanted further was to create another application to collect data from
their official representatives on the ground and use this tool to feed the
Google App Engine application with data.&lt;&#x2F;p&gt;
&lt;p&gt;The application was originally created by &quot;&lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;http:&#x2F;&#x2F;www.espace.com.eg&quot;&gt;Espace&lt;&#x2F;a&gt;&quot; &lt;em&gt;-an awesome Egyptian
company-&lt;&#x2F;em&gt; and published on &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;code.google.com&#x2F;p&#x2F;egypt-election-2012-demo&#x2F;&quot;&gt;Google Code&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;I helped the official campaign with the setup on Google App Engine, but that is
another story.&lt;&#x2F;p&gt;
&lt;p&gt;Before running the project in production, we needed to import a lot of data
about the polling stations and the voters, like the Governorate it belonged to,
the city, the number of voters per every station, the police station it belongs
to, address, etc.&lt;&#x2F;p&gt;
&lt;p&gt;This data was only available in an excel sheet so I had to find a quick
programmatic way to import it.&lt;&#x2F;p&gt;
&lt;p&gt;For the sake of simplicity, lets assume the data in the excel sheet was
formatted like this :&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;plaintext&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-plaintext &quot;&gt;&lt;code class=&quot;language-plaintext&quot; data-lang=&quot;plaintext&quot;&gt;&lt;span&gt;+-------------------+------------+------------------------+
&lt;&#x2F;span&gt;&lt;span&gt;| Polling Station   | City       | Total Number of Voters |
&lt;&#x2F;span&gt;&lt;span&gt;+-------------------+------------+------------------------+
&lt;&#x2F;span&gt;&lt;span&gt;| polling_station_1 | Cairo      | 7734                   |
&lt;&#x2F;span&gt;&lt;span&gt;+-------------------+------------+------------------------+
&lt;&#x2F;span&gt;&lt;span&gt;| polling_station_2 | Giza       | 13332                  |
&lt;&#x2F;span&gt;&lt;span&gt;+-------------------+------------+------------------------+
&lt;&#x2F;span&gt;&lt;span&gt;| polling_station_3 | Alexandria | 10901                  |
&lt;&#x2F;span&gt;&lt;span&gt;+-------------------+------------+------------------------+
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;As in most spreadsheets, the first row is the header row that describes the
data, and the actual data is in the rows to follow.&lt;&#x2F;p&gt;
&lt;p&gt;I did a quick search and found several libraries that deal with excel in Python,
there is even a website dedicated to listing them &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;http:&#x2F;&#x2F;www.python-excel.org&quot;&gt;http:&#x2F;&#x2F;www.python-excel.org&lt;&#x2F;a&gt;.
I chose to go with &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;http:&#x2F;&#x2F;pypi.python.org&#x2F;pypi&#x2F;xlrd&quot;&gt;XLRD&lt;&#x2F;a&gt;, and you can find it in &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;http:&#x2F;&#x2F;www.lexicon.net&#x2F;sjmachin&#x2F;xlrd.htm&quot;&gt;PyPi&lt;&#x2F;a&gt; as well.&lt;&#x2F;p&gt;
&lt;p&gt;We need to install it first by running this command :&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;bash&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-bash &quot;&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span style=&quot;color:#88c0d0;&quot;&gt;pip&lt;&#x2F;span&gt;&lt;span&gt; install xlrd
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Or&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;bash&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-bash &quot;&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span style=&quot;color:#88c0d0;&quot;&gt;easy_install&lt;&#x2F;span&gt;&lt;span&gt; xlrd
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Let&#x27;s start coding.&lt;&#x2F;p&gt;
&lt;p&gt;XLRD calls the whole excel document a &quot;Workbook&quot;, to open it we can do the
following in an interactive python shell from the same path as the file:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;python&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-python &quot;&gt;&lt;code class=&quot;language-python&quot; data-lang=&quot;python&quot;&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; from &lt;&#x2F;span&gt;&lt;span&gt;xlrd &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;import &lt;&#x2F;span&gt;&lt;span&gt;open_workbook 
&lt;&#x2F;span&gt;&lt;span&gt;book &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span style=&quot;color:#88c0d0;&quot;&gt;open_workbook&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;data.xls&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;)
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Now we can manipulate the excel document using this &quot;book&quot; object we created.
Remember the book has all the document.&lt;&#x2F;p&gt;
&lt;p&gt;An excel document can have one or multiple sheets inside it that hold the data.&lt;&#x2F;p&gt;
&lt;p&gt;The first sheet has an index of 0, the second has an index of 1 and so on.&lt;&#x2F;p&gt;
&lt;p&gt;To open the first sheet which holds the sample data above we do this:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;python&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-python &quot;&gt;&lt;code class=&quot;language-python&quot; data-lang=&quot;python&quot;&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;&#x2F;span&gt;&lt;span&gt;first_sheet &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span&gt;book&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color:#88c0d0;&quot;&gt;sheet_by_index&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span&gt;)
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Now we are ready to manipulate the sheet, get information about it and extract
data from it.&lt;&#x2F;p&gt;
&lt;p&gt;For example to know the number of &quot;effective columns&quot; in the sheet we can print
the &lt;code&gt;ncols&lt;&#x2F;code&gt; attribute of the sheet, or to know the number of &quot;effective rows&quot;,
the rows that contain data, we can use the &lt;code&gt;nrows&lt;&#x2F;code&gt; attribute.&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;python&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-python &quot;&gt;&lt;code class=&quot;language-python&quot; data-lang=&quot;python&quot;&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; print &lt;&#x2F;span&gt;&lt;span&gt;first_sheet&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;ncols
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;3
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; print &lt;&#x2F;span&gt;&lt;span&gt;first_sheet&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;nrows
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;4
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;We now know how many rows contain actual data in the first sheet of our excel
document. Time to loop over the rows and extract data.&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;python&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-python &quot;&gt;&lt;code class=&quot;language-python&quot; data-lang=&quot;python&quot;&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; for &lt;&#x2F;span&gt;&lt;span&gt;i &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;in &lt;&#x2F;span&gt;&lt;span style=&quot;font-style:italic;color:#88c0d0;&quot;&gt;range&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;1&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span&gt;first_sheet&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;nrows):
&lt;&#x2F;span&gt;&lt;span&gt;      row &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span&gt;first_sheet&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color:#88c0d0;&quot;&gt;row_slice&lt;&#x2F;span&gt;&lt;span&gt;(i)
&lt;&#x2F;span&gt;&lt;span&gt;      station &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span&gt;row[&lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;0&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;value        &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;\
&lt;&#x2F;span&gt;&lt;span&gt;      city &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span&gt;row[&lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;1&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;value
&lt;&#x2F;span&gt;&lt;span&gt;      voters &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span&gt;row[&lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;2&lt;&#x2F;span&gt;&lt;span&gt;]&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;value
&lt;&#x2F;span&gt;&lt;span&gt;      &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;print &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;Polling Station :&lt;&#x2F;span&gt;&lt;span style=&quot;color:#ebcb8b;&quot;&gt;{}&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt; in &lt;&#x2F;span&gt;&lt;span style=&quot;color:#ebcb8b;&quot;&gt;{}&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt; has &lt;&#x2F;span&gt;&lt;span style=&quot;color:#ebcb8b;&quot;&gt;{}&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt; voter&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color:#88c0d0;&quot;&gt;format&lt;&#x2F;span&gt;&lt;span&gt;(station&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span&gt;city&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span&gt;voters)
&lt;&#x2F;span&gt;&lt;span&gt;Polling station polling_station_1 &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;in &lt;&#x2F;span&gt;&lt;span&gt;Cairo has &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;7734&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;0 &lt;&#x2F;span&gt;&lt;span&gt;voters
&lt;&#x2F;span&gt;&lt;span&gt;Polling station polling_station_2 &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;in &lt;&#x2F;span&gt;&lt;span&gt;Giza has &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;13332&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;0 &lt;&#x2F;span&gt;&lt;span&gt;voters
&lt;&#x2F;span&gt;&lt;span&gt;Polling station polling_station_3 &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;in &lt;&#x2F;span&gt;&lt;span&gt;Alexandria has &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;10901&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;0 &lt;&#x2F;span&gt;&lt;span&gt;voters
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;In the previous snippet of code we started to loop over the rows skipping the
first row &lt;code&gt;range(1, first_sheet.nrows)&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Then we sliced every row out of the sheet with &lt;code&gt;row_slice()&lt;&#x2F;code&gt; and then accessed
it by column index to extract data from columns &lt;code&gt;row[]&lt;&#x2F;code&gt;, and then we accessed
the value of the cell by calling the &lt;code&gt;row[].value&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;This is a very simple usage of the library, I suggest you read its
documentation, you will find many great stuff :&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;python&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-python &quot;&gt;&lt;code class=&quot;language-python&quot; data-lang=&quot;python&quot;&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; import &lt;&#x2F;span&gt;&lt;span&gt;xlrd &lt;&#x2F;span&gt;&lt;span style=&quot;font-style:italic;color:#88c0d0;&quot;&gt;help&lt;&#x2F;span&gt;&lt;span&gt;(xlrd) &lt;&#x2F;span&gt;&lt;span style=&quot;font-style:italic;color:#88c0d0;&quot;&gt;help&lt;&#x2F;span&gt;&lt;span&gt;(xlrd&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;sheet)
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Finally check my answer on a question about the issue on &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;http:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;13805274&#x2F;have-no-idea-with-python-excel-read-data-file&#x2F;13805734#13805734&quot;&gt;StackOverflow&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;That&#x27;s it for now!&lt;&#x2F;p&gt;
</description>
      </item>
      <item>
          <title>Poor Man&#x27;s Guide: Monitoring a Website Using Python</title>
          <pubDate>Mon, 11 Feb 2013 15:34:00 +0000</pubDate>
          <author>Unknown</author>
          <link>https://mosab.co.uk/blog/poor-mans-guide-for-monitoring-a-website-using-python/</link>
          <guid>https://mosab.co.uk/blog/poor-mans-guide-for-monitoring-a-website-using-python/</guid>
          <description xml:base="https://mosab.co.uk/blog/poor-mans-guide-for-monitoring-a-website-using-python/">&lt;p&gt;In one of the projects I am working on there was a problem with Apache server.
It went down almost on a daily basis, and we were reading the logs to get the
bottom of the root cause. But until we got our solution we needed to monitor the
server&#x27;s accessibility through the web, and get alerted if it went down, and
ultimately restart it when this happened.&lt;&#x2F;p&gt;
&lt;p&gt;So I fired up my console and text editor and started hacking a little script to
do the above mentioned side goals.&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;Monitoring the Apache server&#x27;s accessibility from a different server.&lt;&#x2F;li&gt;
&lt;li&gt;SSH the linux box running the server and restarting Apache.&lt;&#x2F;li&gt;
&lt;li&gt;Alerting the DevOps team about the issue.&lt;&#x2F;li&gt;
&lt;li&gt;Putting it all together&lt;&#x2F;li&gt;
&lt;li&gt;Setting up a cron job to run the script&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;I am assuming you are running an Ubuntu machine.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;monitoring-the-apache-server&quot;&gt;Monitoring the Apache Server&lt;&#x2F;h2&gt;
&lt;p&gt;I was confused between two &lt;code&gt;Python 2.x&lt;&#x2F;code&gt; libraries (note that they are
dramatically changed in &lt;code&gt;Python 3.x&lt;&#x2F;code&gt; and choosing between them is subject to
different criteria).&lt;&#x2F;p&gt;
&lt;p&gt;The first library was &lt;code&gt;python-httplib&lt;&#x2F;code&gt; and the second was &lt;code&gt;urllib&lt;&#x2F;code&gt;. After a
quick reading through both library&#x27;s manual and a quick reading on StackOverflow
I have decided to go for urllib.&lt;&#x2F;p&gt;
&lt;p&gt;Basically what I had in mind was to send a GET request to the website served by
Apache and check the HTTP response code I got.&lt;&#x2F;p&gt;
&lt;p&gt;If it is &lt;em&gt;200&lt;&#x2F;em&gt; -which is the SUCCESS response code according to HTTP standards-
then everything is fine.&lt;&#x2F;p&gt;
&lt;p&gt;You can try this in a python interactive shell :&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;python&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-python &quot;&gt;&lt;code class=&quot;language-python&quot; data-lang=&quot;python&quot;&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; import &lt;&#x2F;span&gt;&lt;span&gt;urllib response_code &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;=
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;&#x2F;span&gt;&lt;span&gt;urllib&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color:#88c0d0;&quot;&gt;urlopen&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;http:&#x2F;&#x2F;www.example.com&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color:#88c0d0;&quot;&gt;getcode&lt;&#x2F;span&gt;&lt;span&gt;() &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;print &lt;&#x2F;span&gt;&lt;span&gt;response_code
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;200
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;If the printed value is 200 then the website is up and running, if it has a
different value or raises an Exception then the site is likely down (Assuming
you have internet connectivity, no firewalls blocking your way, etc).&lt;&#x2F;p&gt;
&lt;p&gt;Time to put it together in a script :&lt;&#x2F;p&gt;
&lt;pre data-linenos data-lang=&quot;python&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-python &quot;&gt;&lt;code class=&quot;language-python&quot; data-lang=&quot;python&quot;&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;1&lt;&#x2F;td&gt;&lt;td&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;import &lt;&#x2F;span&gt;&lt;span&gt;urllib
&lt;&#x2F;span&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;&lt;tr&gt;&lt;td&gt;2&lt;&#x2F;td&gt;&lt;td&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;&lt;tr&gt;&lt;td&gt;3&lt;&#x2F;td&gt;&lt;td&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;try&lt;&#x2F;span&gt;&lt;span&gt;:
&lt;&#x2F;span&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;&lt;tr&gt;&lt;td&gt;4&lt;&#x2F;td&gt;&lt;td&gt;&lt;span&gt;  response_code &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span&gt;urllib&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color:#88c0d0;&quot;&gt;urlopen&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;http:&#x2F;&#x2F;www.example.com&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color:#88c0d0;&quot;&gt;getcode&lt;&#x2F;span&gt;&lt;span&gt;()
&lt;&#x2F;span&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;&lt;tr&gt;&lt;td&gt;5&lt;&#x2F;td&gt;&lt;td&gt;&lt;span&gt;  &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;if &lt;&#x2F;span&gt;&lt;span&gt;response_code &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;!= &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;200&lt;&#x2F;span&gt;&lt;span&gt;:
&lt;&#x2F;span&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;&lt;tr&gt;&lt;td&gt;6&lt;&#x2F;td&gt;&lt;td&gt;&lt;span&gt;    &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;raise &lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fbcbb;&quot;&gt;ValueError
&lt;&#x2F;span&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;&lt;tr&gt;&lt;td&gt;7&lt;&#x2F;td&gt;&lt;td&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;except&lt;&#x2F;span&gt;&lt;span&gt;:
&lt;&#x2F;span&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;&lt;tr&gt;&lt;td&gt;8&lt;&#x2F;td&gt;&lt;td&gt;&lt;span&gt;  &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;pass &lt;&#x2F;span&gt;&lt;span style=&quot;color:#616e88;&quot;&gt;# Here write code to do whatever you want to do when the website is down.
&lt;&#x2F;span&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h2 id=&quot;restart-the-apache-server-remotely&quot;&gt;Restart the Apache server remotely&lt;&#x2F;h2&gt;
&lt;p&gt;There is a wonderful Python library and a command-line tool called &lt;em&gt;&lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;http:&#x2F;&#x2F;docs.fabfile.org&#x2F;en&#x2F;1.5&#x2F;&quot;&gt;Fabric&lt;&#x2F;a&gt;&lt;&#x2F;em&gt;
that helps you streamlining the use of SSH for application deployment or systems
administration tasks. It is ideally used to automate tedious error prone tasks
in an easy way.&lt;&#x2F;p&gt;
&lt;p&gt;You can read about more about it in their documentation.&lt;&#x2F;p&gt;
&lt;p&gt;Install it by running the following command:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;bash&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-bash &quot;&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span style=&quot;color:#88c0d0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span&gt; apt-get install fabric
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;We now need to create a new python file that I will name &lt;code&gt;fabfile.py&lt;&#x2F;code&gt;, you can
name it anything, but let&#x27;s just follow the common name you will see in Fabric&#x27;s
documentation.&lt;&#x2F;p&gt;
&lt;pre data-linenos data-lang=&quot;python&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-python &quot;&gt;&lt;code class=&quot;language-python&quot; data-lang=&quot;python&quot;&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;1&lt;&#x2F;td&gt;&lt;td&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;from &lt;&#x2F;span&gt;&lt;span&gt;fabric&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;api &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;import &lt;&#x2F;span&gt;&lt;span&gt;env&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span&gt;sudo
&lt;&#x2F;span&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;&lt;tr&gt;&lt;td&gt;2&lt;&#x2F;td&gt;&lt;td&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;&lt;tr&gt;&lt;td&gt;3&lt;&#x2F;td&gt;&lt;td&gt;&lt;span&gt;env&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;hosts &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span&gt;[&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;user@server&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;] env&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;passwords &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;user@server&amp;#39; &lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;: &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;password&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;}
&lt;&#x2F;span&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;&lt;tr&gt;&lt;td&gt;4&lt;&#x2F;td&gt;&lt;td&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;&lt;tr&gt;&lt;td&gt;5&lt;&#x2F;td&gt;&lt;td&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;def &lt;&#x2F;span&gt;&lt;span style=&quot;color:#88c0d0;&quot;&gt;restart_apache&lt;&#x2F;span&gt;&lt;span&gt;():
&lt;&#x2F;span&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;&lt;tr&gt;&lt;td&gt;6&lt;&#x2F;td&gt;&lt;td&gt;&lt;span&gt;  &lt;&#x2F;span&gt;&lt;span style=&quot;color:#88c0d0;&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;apache2ctl restart&amp;quot;&lt;&#x2F;span&gt;&lt;span&gt;)
&lt;&#x2F;span&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;We start by importing what we need from Fabric. Then we tell it some information
about the server we want to restart Apache on by setting the &lt;code&gt;env.hosts&lt;&#x2F;code&gt; and
&lt;code&gt;env.passwords&lt;&#x2F;code&gt; variables.&lt;&#x2F;p&gt;
&lt;p&gt;Then we define a &lt;code&gt;restart_apache&lt;&#x2F;code&gt; function that we will call later to do the
actual restart.&lt;&#x2F;p&gt;
&lt;p&gt;There are three main functions that are used the most, &lt;code&gt;local()&lt;&#x2F;code&gt; that runs local
commands, &lt;code&gt;run()&lt;&#x2F;code&gt; that runs commands on the remote server and &lt;code&gt;sudo()&lt;&#x2F;code&gt; that runs
commands on the remote server using &lt;code&gt;sudo&lt;&#x2F;code&gt;. Since Apache restart requires a root
user or sudo privileges we used the &lt;code&gt;sudo()&lt;&#x2F;code&gt; function.&lt;&#x2F;p&gt;
&lt;p&gt;To run a Fabric script open up your terminal and run the following command:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;bash&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-bash &quot;&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span style=&quot;color:#88c0d0;&quot;&gt;fabric&lt;&#x2F;span&gt;&lt;span&gt; fabfile.py restart_apache
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;If you want to run it from a different directory than the &lt;code&gt;fabfile.py&lt;&#x2F;code&gt; then you
need to use the &lt;code&gt;-f&lt;&#x2F;code&gt; option like this :&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;bash&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-bash &quot;&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span style=&quot;color:#88c0d0;&quot;&gt;fabric&lt;&#x2F;span&gt;&lt;span&gt; -f &#x2F;path&#x2F;to&#x2F;your&#x2F;fabfile.py function_name
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h2 id=&quot;alerting-the-devops-team-about-the-issue&quot;&gt;Alerting the DevOps team about the issue.&lt;&#x2F;h2&gt;
&lt;p&gt;We can re-use the email function from the previous post on this blog &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;mosab.co.uk&#x2F;installing-gdata-python-client-on-dreamhost.html&quot;&gt;Installing
Gdata Python Client on Dreamhost&lt;&#x2F;a&gt;:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;python&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-python &quot;&gt;&lt;code class=&quot;language-python&quot; data-lang=&quot;python&quot;&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;import &lt;&#x2F;span&gt;&lt;span&gt;smtplib
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;from &lt;&#x2F;span&gt;&lt;span&gt;email&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;MIMEMultipart &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;import &lt;&#x2F;span&gt;&lt;span&gt;MIMEMultipart
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;from &lt;&#x2F;span&gt;&lt;span&gt;email&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;MIMEBase &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;import &lt;&#x2F;span&gt;&lt;span&gt;MIMEBase
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;from &lt;&#x2F;span&gt;&lt;span&gt;email&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;MIMEText &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;import &lt;&#x2F;span&gt;&lt;span&gt;MIMEText
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;from &lt;&#x2F;span&gt;&lt;span&gt;email &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;import &lt;&#x2F;span&gt;&lt;span&gt;Encoders
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;subject &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;Your website is down&amp;#39; &lt;&#x2F;span&gt;&lt;span&gt;email_body &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;Your website is down&amp;#39;
&lt;&#x2F;span&gt;&lt;span&gt;gmail_user &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;YOUR-GMAIL-ADDRESS&amp;#39; &lt;&#x2F;span&gt;&lt;span&gt;gmail_pwd &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;YOUR-GMAIL-PASSWORD&amp;#39;
&lt;&#x2F;span&gt;&lt;span&gt;recipient &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;DEVOPS-EMAIL&amp;#39;
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;def &lt;&#x2F;span&gt;&lt;span style=&quot;color:#88c0d0;&quot;&gt;mail&lt;&#x2F;span&gt;&lt;span&gt;(to&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span&gt;subject&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span&gt;text&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span&gt;gmail_user&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span&gt;gmail_pwd):
&lt;&#x2F;span&gt;&lt;span&gt;    &lt;&#x2F;span&gt;&lt;span style=&quot;color:#616e88;&quot;&gt;&amp;#39;&amp;#39;&amp;#39;Sends mail using gmail&amp;#39;&amp;#39;&amp;#39;
&lt;&#x2F;span&gt;&lt;span&gt;    msg &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span style=&quot;color:#88c0d0;&quot;&gt;MIMEMultipart&lt;&#x2F;span&gt;&lt;span&gt;()
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;    &lt;&#x2F;span&gt;&lt;span style=&quot;color:#616e88;&quot;&gt;# Setting up message data
&lt;&#x2F;span&gt;&lt;span&gt;    msg[&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;From&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;] &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;DEVOPS-EMAIL&amp;#39;
&lt;&#x2F;span&gt;&lt;span&gt;    msg[&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;To&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;] &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span&gt;to
&lt;&#x2F;span&gt;&lt;span&gt;    msg[&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;Subject&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;] &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span&gt;subject msg&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color:#88c0d0;&quot;&gt;attach&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#88c0d0;&quot;&gt;MIMEText&lt;&#x2F;span&gt;&lt;span&gt;(text))
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;    &lt;&#x2F;span&gt;&lt;span style=&quot;color:#616e88;&quot;&gt;# Opening the connection with Gmail SMTP server
&lt;&#x2F;span&gt;&lt;span&gt;    mailServer &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span&gt;smtplib&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color:#88c0d0;&quot;&gt;SMTP&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;quot;smtp.gmail.com&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;587&lt;&#x2F;span&gt;&lt;span&gt;)
&lt;&#x2F;span&gt;&lt;span&gt;    mailServer&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color:#88c0d0;&quot;&gt;ehlo&lt;&#x2F;span&gt;&lt;span&gt;()
&lt;&#x2F;span&gt;&lt;span&gt;    mailServer&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color:#88c0d0;&quot;&gt;starttls&lt;&#x2F;span&gt;&lt;span&gt;()
&lt;&#x2F;span&gt;&lt;span&gt;    mailServer&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color:#88c0d0;&quot;&gt;ehlo&lt;&#x2F;span&gt;&lt;span&gt;()
&lt;&#x2F;span&gt;&lt;span&gt;    mailServer&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color:#88c0d0;&quot;&gt;login&lt;&#x2F;span&gt;&lt;span&gt;(gmail_user&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span&gt;gmail_pwd)
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;    &lt;&#x2F;span&gt;&lt;span style=&quot;color:#616e88;&quot;&gt;# Actual sending of the email
&lt;&#x2F;span&gt;&lt;span&gt;    mailServer&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color:#88c0d0;&quot;&gt;sendmail&lt;&#x2F;span&gt;&lt;span&gt;(gmail_user&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span&gt;to&lt;&#x2F;span&gt;&lt;span style=&quot;color:#eceff4;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span&gt;msg&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color:#88c0d0;&quot;&gt;as_string&lt;&#x2F;span&gt;&lt;span&gt;())
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;    &lt;&#x2F;span&gt;&lt;span style=&quot;color:#616e88;&quot;&gt;# Closing the connection # Should be mailServer.quit(), but that crashes
&lt;&#x2F;span&gt;&lt;span&gt;    mailServer&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color:#88c0d0;&quot;&gt;close&lt;&#x2F;span&gt;&lt;span&gt;()
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h2 id=&quot;putting-it-all-together&quot;&gt;Putting it all together&lt;&#x2F;h2&gt;
&lt;p&gt;I have combined all the snippets mentioned above, modified them and added some
logging functionality to it.&lt;&#x2F;p&gt;
&lt;p&gt;I have it installed on &lt;code&gt;&#x2F;opt&#x2F;fabfile.py&lt;&#x2F;code&gt; and I have created a &lt;code&gt;&#x2F;opt&#x2F;fab_logs&lt;&#x2F;code&gt;
folder to hold the log files.&lt;&#x2F;p&gt;
&lt;p&gt;Here is a gist with the complete script:&lt;&#x2F;p&gt;
&lt;script src=&quot;https:&#x2F;&#x2F;gist.github.com&#x2F;mos3abof&#x2F;4771874.js&quot;&gt;&lt;&#x2F;script&gt;
&lt;h2 id=&quot;setting-up-a-cron-job-to-run-the-script&quot;&gt;Setting up a cron job to run the script&lt;&#x2F;h2&gt;
&lt;p&gt;Now we have a great script, and we know how to run it manually. But it would be
inconvenient to run it manually all the time. We need to setup a cron job to do
it periodically for us.&lt;&#x2F;p&gt;
&lt;p&gt;Run the following command in the terminal to edit your crontab file:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;bash&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-bash &quot;&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span style=&quot;color:#88c0d0;&quot;&gt;crontab&lt;&#x2F;span&gt;&lt;span&gt; -e
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Then add the following line to the file to run the script every hour:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;bash&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-bash &quot;&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span style=&quot;color:#88c0d0;&quot;&gt;0 &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;* * * *&lt;&#x2F;span&gt;&lt;span&gt; &#x2F;usr&#x2F;bin&#x2F;fab -f &#x2F;path&#x2F;to&#x2F;your&#x2F;fabfile.py restart_apache
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Happy website monitoring.&lt;&#x2F;p&gt;
</description>
      </item>
      <item>
          <title>Installing Gdata Python Client on Dreamhost</title>
          <pubDate>Thu, 29 Nov 2012 20:05:00 +0000</pubDate>
          <author>Unknown</author>
          <link>https://mosab.co.uk/blog/installing-gdata-python-client-on-dreamhost/</link>
          <guid>https://mosab.co.uk/blog/installing-gdata-python-client-on-dreamhost/</guid>
          <description xml:base="https://mosab.co.uk/blog/installing-gdata-python-client-on-dreamhost/">&lt;p&gt;Our company&#x27;s website is hosted on &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;http:&#x2F;&#x2F;www.dreamhost.com&quot;&gt;Dreamhost&lt;&#x2F;a&gt;. Today I needed to write a
python script that utilizes some of Youtube&#x27;s APIs to send us a daily digest of
videos we are interested in, so I ran into the problem of needing to install a
python library on our hosting account which I don&#x27;t have root or admin access
to.&lt;&#x2F;p&gt;
&lt;p&gt;Here is what I did.&lt;&#x2F;p&gt;
&lt;p&gt;First of all, I am assuming that you have enabled SSH access to your domain name
you are doing this for. If this is not the case, then this article may be of
great help : &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;http:&#x2F;&#x2F;ahappycustomer.dreamhosters.com&#x2F;dreamhost-ssh.html&quot;&gt;DreamHost SSH&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;I downloaded the &lt;a rel=&quot;noopener&quot; target=&quot;_blank&quot; href=&quot;http:&#x2F;&#x2F;code.google.com&#x2F;p&#x2F;gdata-python-client&#x2F;downloads&#x2F;list&quot;&gt;gdata-python-client&lt;&#x2F;a&gt; from code.google.com (at the moment
I am writing this post the latest stable version is 2.0.17) using the
following command :&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;bash&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-bash &quot;&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span style=&quot;color:#88c0d0;&quot;&gt;cd &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;~
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#88c0d0;&quot;&gt;wget&lt;&#x2F;span&gt;&lt;span&gt; http:&#x2F;&#x2F;gdata-python-client.googlecode.com&#x2F;files&#x2F;gdata-2.0.17.tar.gz
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Untar the tarball:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;bash&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-bash &quot;&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span style=&quot;color:#88c0d0;&quot;&gt;tar&lt;&#x2F;span&gt;&lt;span&gt; -xzvf gdata-2.0.17.tar.gz
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Change your directory to the uncompressed folder:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;bash&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-bash &quot;&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span style=&quot;color:#88c0d0;&quot;&gt;cd&lt;&#x2F;span&gt;&lt;span&gt; gdata-2.0.17
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Here is the trick, since we don&#x27;t have administrative access, we can&#x27;t
install the library system-wide, but we can however install it for our
account by running this command:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;bash&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-bash &quot;&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span style=&quot;color:#88c0d0;&quot;&gt;python&lt;&#x2F;span&gt;&lt;span&gt; setup.py install --home&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;=~&lt;&#x2F;span&gt;&lt;span&gt;&#x2F;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;To test if everything is right run the following command :&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;bash&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-bash &quot;&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span style=&quot;color:#88c0d0;&quot;&gt;.&#x2F;tests&#x2F;run_all_tests.py
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Although the library is now installed on your account, you can&#x27;t yet import
it directly, you need to add the path of libraries to the system.path in your
python script in order to be able to import it, so at the beginning of your
script add the following two lines:&lt;&#x2F;p&gt;
&lt;pre data-linenos data-lang=&quot;python&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-python &quot;&gt;&lt;code class=&quot;language-python&quot; data-lang=&quot;python&quot;&gt;&lt;table&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;1&lt;&#x2F;td&gt;&lt;td&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;import &lt;&#x2F;span&gt;&lt;span&gt;os
&lt;&#x2F;span&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;&lt;tr&gt;&lt;td&gt;2&lt;&#x2F;td&gt;&lt;td&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;import &lt;&#x2F;span&gt;&lt;span&gt;sys
&lt;&#x2F;span&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;&lt;tr&gt;&lt;td&gt;3&lt;&#x2F;td&gt;&lt;td&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;&lt;tr&gt;&lt;td&gt;4&lt;&#x2F;td&gt;&lt;td&gt;&lt;span&gt;sys&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;path&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color:#88c0d0;&quot;&gt;append&lt;&#x2F;span&gt;&lt;span&gt;(os&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;environ[&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;HOME&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;] &lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;+ &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;&#x2F;lib&#x2F;python&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;)
&lt;&#x2F;span&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;What these two lines do is constructing a dynamic path to your new lib folder
that contains gdata-python-client by getting the home path from the system
registered in the variable &lt;code&gt;os.environ[&#x27;HOME&#x27;]&lt;&#x2F;code&gt; and concatenating &lt;code&gt;&#x2F;lib&#x2F;python&lt;&#x2F;code&gt;
to it, then it appends this dynamically generated path to the system path so
that the python interpreter will look into this folder when importing gdata&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;li&gt;
&lt;p&gt;Now you can do stuff with gdata like :&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;python&quot; style=&quot;background-color:#2e3440;color:#d8dee9;&quot; class=&quot;language-python &quot;&gt;&lt;code class=&quot;language-python&quot; data-lang=&quot;python&quot;&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; import &lt;&#x2F;span&gt;&lt;span&gt;gdata&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;youtubeimport
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;&#x2F;span&gt;&lt;span&gt;gdata&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;youtube&lt;&#x2F;span&gt;&lt;span style=&quot;color:#81a1c1;&quot;&gt;.&lt;&#x2F;span&gt;&lt;span&gt;service
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;Here is my final script that I wrote, and I set up a cron job to run it every
morning:&lt;&#x2F;p&gt;
&lt;script src=&quot;https:&#x2F;&#x2F;gist.github.com&#x2F;mos3abof&#x2F;4164654.js&quot;&gt;&lt;&#x2F;script&gt;
&lt;p&gt;Happy Gdata programming on Dreamhost :)&lt;&#x2F;p&gt;
</description>
      </item>
      <item>
          <title>Caffeine Code Cycle</title>
          <pubDate>Wed, 11 Mar 2009 22:00:00 +0000</pubDate>
          <author>Unknown</author>
          <link>https://mosab.co.uk/blog/caffeine-code-cycle/</link>
          <guid>https://mosab.co.uk/blog/caffeine-code-cycle/</guid>
          <description xml:base="https://mosab.co.uk/blog/caffeine-code-cycle/">&lt;p&gt;I saw this quote and loved it:&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;Developers are living organisms that convert Caffeine into code!&lt;&#x2F;p&gt;
&lt;p&gt;&lt;em&gt;-- Source Unknown&lt;&#x2F;em&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;So I made this diagram :&lt;&#x2F;p&gt;
&lt;p&gt;&lt;img src=&quot;http:&#x2F;&#x2F;1.bp.blogspot.com&#x2F;__NpWKU9Ntik&#x2F;SoGQ0xB-lAI&#x2F;AAAAAAAAAeo&#x2F;WTEPrJnuJmY&#x2F;s400&#x2F;caffeineCode.png&quot; alt=&quot;Developers are living organisms that convert Caffeine into code&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
</description>
      </item>
    </channel>
</rss>
