Skip to content

Instantly share code, notes, and snippets.

View maxwellgithinji's full-sized avatar

Charles Maxwel Githinji Waweru maxwellgithinji

View GitHub Profile
"""
User authentication test cases
"""
from rest_framework.test import APIClient
from rest_framework import status
from django.core.urlresolvers import reverse
class UserAuth(TestCase):
@maxwellgithinji
maxwellgithinji / media-query.css
Created July 22, 2019 06:09 — forked from gokulkrishh/media-query.css
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
//CSS

Frontend Masters: React && Firebase (Version 2)

Contact Information

Prequisite Setup

  • A recent version of Node.js
  • npm install -g create-react-app
// A type may have a method set associated with it. The method set of an interface type is its interface.
// type T
// The method set of any other type T consists of all methods declared with receiver type T.
package main
import (
"fmt"
)
// type *T
// The method set of the corresponding pointer type *T is the set of all methods declared with receiver *T or T (that is, it also contains the method set of T).
package main
import (
"fmt"
)
type Person struct {
//NOte you can easily swap the storage for your database without changing much of the code
package main
import (
"fmt"
)
type user struct {
first string
}
//create a file `file-01.txt` in the same directory with some content to get started
package main
import (
"fmt"
"io"
"os"
)
func main() {
// Given an array of integer numbers, we need to find
// maximum size of a subset such that sum of each pair
// of this subset is not divisible by K.
// Examples :
// Input : arr[] = [3, 7, 2, 9, 1]
// K = 3
// Output : 3
// Maximum size subset whose each pair sum
// is not divisible by K is [3, 7, 1] because,
package main
import (
"context"
"fmt"
)
type key int
var userKey key = 0
package main
import (
"context"
"fmt"
"time"
)
func main() {
ctx := context.Background()