Skip to content

Instantly share code, notes, and snippets.

View gajeshbhat's full-sized avatar
🎯
Focusing

Gajesh Bhat gajeshbhat

🎯
Focusing
View GitHub Profile
@DavidHickman
DavidHickman / layout.html
Created December 6, 2016 15:55
Adding Bootstrap alerts as Flask flash messages
{% with messages = get_flashed_messages() %}
{% if messages %}
<ul class="flashes list-group">
{% for message in messages %}
<li class="list-group-item">
<div class="alert alert-success">{{message}}</div>
</li>
{% endfor %}
</ul>
{% endif %}
@wojteklu
wojteklu / clean_code.md
Last active November 20, 2024 06:28
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@jctosta
jctosta / screen_cheatsheet.markdown
Last active November 17, 2024 08:18
Screen Cheatsheet

Screen Quick Reference

Basic

Description Command
Start a new session with session name screen -S <session_name>
List running sessions / screens screen -ls
Attach to a running session screen -x
Attach to a running session with name screen -r
@pitch-gist
pitch-gist / gist:2999707
Created June 26, 2012 22:21
HTML: Simple Maintenance Page
<!doctype html>
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>