Skip to content

Instantly share code, notes, and snippets.

View charisschomba's full-sized avatar
💭
The reward for work well done is the opportunity to do more.

Tee Jay charisschomba

💭
The reward for work well done is the opportunity to do more.
View GitHub Profile
import React from 'react';
import { Button, Modal } from 'semantic-ui-react';
import PropTypes from 'prop-types';
const DeleteUser = ({ closeModal, open, handleDelete }) => {
return (
<div>
<Modal size="mini" open={open} onClose={closeModal} className="show">
<Modal.Header>Delete user account</Modal.Header>
<Modal.Content>
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { Form, Message } from 'semantic-ui-react';
import Select from 'react-select';
import makeAnimated from 'react-select/lib/animated';
import PropTypes from 'prop-types';
import mapGroupOptions from '../../utils/mapGroups';
import { fetchingGroups } from '../../store/actions/groups';
import { startRegistration } from '../../store/sagas/users';
@charisschomba
charisschomba / password_generator.py
Created February 2, 2019 20:19
Password Generator generates highly secure passwords that are difficult to crack or guess.
import secrets
import string
from pyperclip import copy
from validators import validators
secure_random = secrets.SystemRandom()
letters = string.ascii_letters
digits = string.digits
special = string.punctuation
validator = [
@charisschomba
charisschomba / test.py
Created September 19, 2018 12:32
Testing if the user can login successfully
from django.test import TestCase
from rest_framework import status
from rest_framework.test import APIClient
class LoginTestCase(TestCase):
def setUp():
self.client = APIClient()
self.user = {
"username": "andela",