Skip to content

Instantly share code, notes, and snippets.

View bneff84's full-sized avatar

Brian Neff bneff84

View GitHub Profile
@bneff84
bneff84 / auth.ts
Created February 28, 2021 18:17 — forked from AndreaMinato/auth.ts
Typescript Vuex Module
import axios, { AxiosRequestConfig } from "axios";
import router from "@/router"; //shortcut to src
import { Module } from "vuex";
const authModule: Module<any, any> = {
state: {
loggedIn: false,
loginError: null,
username: null
@bneff84
bneff84 / mailhog-install.md
Created January 28, 2020 20:48 — forked from viktorpetryk/mailhog-install.md
MailHog installation on Ubuntu

Install & Configure MailHog

  1. Download and make it executable
wget https://github.com/mailhog/MailHog/releases/download/v1.0.0/MailHog_linux_amd64
sudo cp MailHog_linux_amd64 /usr/local/bin/mailhog
sudo chmod +x /usr/local/bin/mailhog
  1. Make MailHog as a service
@bneff84
bneff84 / pre-request-script.js
Last active May 15, 2024 09:38
Postman WSSE Header Generation Pre-request Script (Tailored for Emarsys)
/*
* This script should be used as the pre-request script for any requests made to Emarsys. In theory, it should work for any API that implements WSSE authentication as well.
* To Use:
* 1: Set an environment variable for wsse-user and wsse-secret containing your WSSE user and secret respectively
* 2: On your Headers tab, add an X-WSSE header with a value of {{wsse-header}}
*
* That's it! When you make a request, the pre-request script will generate your Nonce, Timestamp, and Digest using your secret. The 1-time-use header will be stored in the environment as wsse-header and used for your request.
*/
//
// wsse.js - Generate WSSE authentication header in JavaScript
@bneff84
bneff84 / .bash_profile
Last active December 12, 2018 14:31 — forked from natelandau/.bash_profile
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
@bneff84
bneff84 / generate.php
Last active August 29, 2015 14:21 — forked from cowlby/generate.php
<?php
/**
* This script can be used for generating PHP model for PDT.
* It builds PHP functions according to the loaded extensions in running PHP,
* using complementary information gathered from PHP.net documentation
*
* @author Michael Spector <michael@zend.com>
*/
if (version_compare(phpversion(), "5.0.0") < 0) {