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
@charisschomba
charisschomba / postman-update.sh
Created October 26, 2023 11:16 — forked from lira/postman-update.sh
Install/Update postman or postman canary (beta) for linux. Tested in ubuntu 17.10 gnome3
#!/bin/bash
cd /tmp || exit
read -r -p "[s]table or [b]eta? [sS/bB] " choice
choice=${choice,,} # tolower
if [[ ! "$choice" =~ ^(s|b)$ ]]; then
exit
fi
if [[ "$choice" = "s" ]]; then
url=https://dl.pstmn.io/download/latest/linux64
name=Postman
const { JengaApiSdk } = require("jenga-apis-sdk");
const config = {
apiKey: "your api key",
merchantCode: "your merchant code",
consumerSecret: "your consumer secret",
privateKeyPath: `absoulte path to your private key`,
verbose: true, //Optional defaults to false
enableLogging: true, //Optional defaults to false
env: "UAT or PROD", //Optional defaults to UAT
import { runSaga } from 'redux-saga';
import { put, takeLatest } from 'redux-saga/effects';
import { api } from '../../../utils/api';
import {
registerUser,
editUser,
watchUserEdit,
watchRegistration,
} from '../../../store/sagas/users/AddUsersSaga';
import { REGISTERING_USER, EDITING_USER } from '../../../constants/users';
import {
REGISTER_USER,
REGISTER_SUCCESS,
REGISTER_ERROR,
} from '../../../constants/users';
import addUser from '../../../store/reducers/users';
import initialState, {
initialStateEdit,
} from '../../../__mocks__/initialState';
import React from 'react';
import { mount } from 'enzyme';
import { AddUser, mapStateToProps } from '../../../containers/Users/AddUser';
import fetchedGroups from '../../../__mocks__/fetchGroups';
const state = {
register: jest.fn(),
groups: jest.fn(),
};
import React from 'react';
import { mount } from 'enzyme';
import UsersDetails from '../../../components/Users/USersDetails';
import user from '../../../__mocks__/fetchUserData';
const state = {
deleteModalOpen: false,
selectedUser: null,
};
export const REGISTER_USER = "REGISTER_USER";
export const REGISTER_ERROR = "REGISTER_ERROR";
export const REGISTER_SUCCESS = "REGISTER_SUCCESS";
export const REGISTERING_USER = "REGISTERING_USER";
import {
REGISTER_USER,
REGISTER_ERROR,
REGISTER_SUCCESS,
} from '../../../constants/users';
const initialState = {
status: false,
success: false,
isRegistering: false,
import { takeLatest, put, call } from 'redux-saga/effects';
import { REGISTERING_USER, EDITING_USER } from '../../../constants/users';
import {
registerUserSuccess,
registrationStarted,
registerUserFailure,
} from '.';
import { api } from '../../../utils/api';
export function* registerUser({ payload }) {
import React, { Component } from 'react';
import { Table, Grid, Container } from 'semantic-ui-react';
import * as PropTypes from 'prop-types';
import ActionButtons from '../common/ActionButtons';
import NoResults from '../common/TableRowLoading/NoResultsRow';
import Loader from '../common/TableRowLoading';
import DeleteUser from './deleteUser';
class DisplayUsers extends Component {
state = {