Skip to content

Instantly share code, notes, and snippets.

View kelvinndmo's full-sized avatar
🏠
Working from home

Novak kelvinndmo

🏠
Working from home
View GitHub Profile
from django.test import TestCase
from sendy.models import Parcel
# Create your tests here.
class TestParcel(TestCase):
def setUp(self):
self.parcel = Parcels(sender="Kelvin onkundi", email="onkundi@olympians.com", Recipient="Swaleh", recepient_contact="07999999")
self.parcel.save()
def test_create_parcel(self):
import os
from flask import Flask, request, jsonify
from flask_sqlalchemy import SQLAlchemy
from flask_marshmallow import Marshmallow
# init app
app = Flask(__name__)
basedir = os.path.abspath(os.path.dirname(__file__))
@media only screen and (max-width: 2652px) {
}
@media only screen and (max-width: 2326px) {
}
@media only screen and (max-width: 1200px) {
import africastalking
username = "sandbox" # use 'sandbox' for development in the test environment
# use your sandbox app API key for development in the test environment
api_key = "f873c8ed57eba5f24617beed4ea843449e2f48a12f4f0bece742d6faae1203a2"
africastalking.initialize(username, api_key)
# # Use the service synchronously
<div class="row card-group">
<div class="col-2" *ngFor="let user of users">
<div class="card" style="width: 18rem;margin-right: 10px; padding: 10px;">
<img class="card-img-top" src="{{user.avatar_url}}" alt="Card image cap">
<div class="card-body">
<h5 class="card-title">{{user.login}}</h5>
<p class="card-text">{{user.bio}}</p>
<a href="#" class="btn btn-secondary btn-outline">Go somewhere</a>
<a href="#" class="btn btn-primary">Go somewhere</a>
@kelvinndmo
kelvinndmo / docker-help.md
Created November 1, 2019 16:42 — forked from bradtraversy/docker-help.md
Docker Commands, Help & Tips

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info

.row{
max-width: $grid-width;
background-color: red;
margin: 0 auto;
&:not(:last-child){
margin-bottom: $gutter-vertical;
}
@include clearfix;
[class^="col-"]{
<div class="row">
<div class="col-1-of-2">Col 1 of 2</div>
<div class="col-1-of-2">Col 1 of 2</div>
</div>
<div class="row">
<div class="col-1-of-3">Col 1 of 3</div>
<div class="col-1-of-3">Col 1 of 3</div>
<div class="col-1-of-3">Col 1 of 3</div>
</div>
<div class="row">
def add(x, y):
return x + y
def substract(x, y):
return x - y
def multiply(x, y):
return x * y
import calculator
import unittest
class TestClass(unittest.TestCase):
def test_add(self):
""" test for the add function """
self.assertEqual(calculator.add(10, 15), 25)