Skip to content

Instantly share code, notes, and snippets.

Muzikayise Flynn Buthelezi (zuluCoda) zulucoda

Block or report user

Report or block zulucoda

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View userLoginSagaRefactor.test.js
describe('Unit Test - Login Sagas', () => {
describe('userLoginSagaRefactor', () => {
describe('when user is authorised', () => {
it('should yield userLoginSagaRefactor saga, which yields getLoginFormState, yield authoriseUser yield LoginActions.clearLogin and yield getUserSettingsSaga', () => {
const generator = userLoginSagaRefactor();
expect(generator.next().value).toEqual(select(getLoginFormState));
expect(
generator.next({
@zulucoda
zulucoda / userLoginSagaRefactor.js
Last active Jan 27, 2019
After Refactor - user login proccess
View userLoginSagaRefactor.js
/**
* Authorise user
* @param username
* @param password
*/
export function* authoriseUserSaga(username, password) {
try {
// call login Api endpoint with user username and password
const loginService = new LoginService();
const response = yield call([loginService, get, username, password]);
@zulucoda
zulucoda / userLoginSaga.js
Last active Jan 27, 2019
Before Refactor - user login proccess
View userLoginSaga.js
/**
* Before Refactor - user login proccess
* @see https://blog.mfbproject.co.za
*/
export function* userLoginSaga() {
// 1. get the username and password from state.
const { username, password } = yield select(getLoginFormState);
// 2. call login API endpoint with the username and password
@zulucoda
zulucoda / create-web-application-in-iis.ps1
Created Oct 5, 2014
This is a PowerShell script which can be used to deploy web applications to IIS. Therefore you may use to automate your deployments.
View create-web-application-in-iis.ps1
<# .SYNOPSIS
create-web-application - Automatic website creation.
.DESCRIPTION
Allows you to create a website and its ApplicationPool.
.NOTES
File Name : create-web-application.ps1
Author : Muzikayise Flynn Buthelezi - muzi@mfbproject.co.za
Copyright : MFBproject mfbproject.co.za
.EXAMPLE
PS D:\>create-web-application.ps1 -SiteName TESTSITE -Port 8080 -Environment PREPROD -Runtime v4.0 -Pipeline Classic
@zulucoda
zulucoda / webstorm-input-fix.sh
Last active Aug 29, 2015
A small minor issue in Ubuntu. is a random bug which causes the IDEs to loose cursor, therefore it seems like your IDEs is frozen but it's not you still able to perform mouse clicks and select menus but you just can't type. There's a bug open for this issue but because it's difficult to resolve because it occurs randomly. This may seem frustrati…
View webstorm-input-fix.sh
#!/bin/bash
clear
echo "webstorm or rubymine keyboard input reset"
ibus restart
echo "done"
You can’t perform that action at this time.