Skip to content

Instantly share code, notes, and snippets.

View EricTatua's full-sized avatar

Eric Tatua EricTatua

  • BlueSync
  • Nairobi, Kenya
View GitHub Profile
@EricTatua
EricTatua / media.scss
Last active March 25, 2022 04:46
SCSS/Screen Size Media queries
// Source Bootstrap Mixins
$grid-breakpoints: (
xs: 0,
sm: 576px,
md: 768px,
lg: 992px,
xl: 1200px,
xxl: 1400px
);
@EricTatua
EricTatua / order_conf.html
Created December 21, 2021 21:04 — forked from LowerDeez/order_conf.html
Django. Send mail with custom html template and context
<!DOCTYPE html>
<html>
<body>
<br>
<h2>Thank you for your order {{ order.full_name }}</h2>
<h3>Your Order ID: {{ order.short_uuid }}</h3>
<h3>Shipping Details:</h3>
@EricTatua
EricTatua / through_relationships.py
Created November 12, 2021 11:49 — forked from jhgaylor/through_relationships.py
Example of using a through model in Django and filtering by a value on the custom through model.
class A(models.Model):
things = models.ManyToManyField("B", through=ThroughModel)
class B(models.Model):
text = models.TextField()
class ThroughModel(models.Model):
a = models.ForeignKey(A)
b = models.ForeignKey(B)
extra = models.BooleanField()
<!-- Download the js and css file and place at the below specified location. -->
<!-- In html add this to head tag -->
<link href="{% static 'css/toastr.min.css' %}" rel="stylesheet">
<!-- In html add this just before end of body tag -->
<script src="{% static 'js/toastr.js' %}" type="text/javascript"></script>
@EricTatua
EricTatua / gist:79b9c77ae4a1b9901f6baa5e02ca41b5
Created September 1, 2020 15:01 — forked from pitch-gist/gist:2999707
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>
@EricTatua
EricTatua / apache-server.md
Last active June 9, 2020 06:48
Apache Server Settings

Apache

Apache Server Settings

Basic Server settings

@EricTatua
EricTatua / nginx-server.md
Last active June 8, 2020 07:51
Nginx Server Configuration

Nginx

Nginx Server Settings

Basic Server settings

@EricTatua
EricTatua / site-ssl.conf
Created June 8, 2020 07:37
Apache Server Config
<VirtualHost *:80>
ServerName your-domain
Redirect / https://your-domain
</VirtualHost>
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName your-domain
ServerAlias www.your-domain
ServerAdmin webmaster@localhost
DocumentRoot /var/www/your-domain
@EricTatua
EricTatua / docker-help.md
Created June 24, 2019 12:47 — forked from bradtraversy/docker-help.md
Docker Commands, Help & Tips

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info