Skip to content

Instantly share code, notes, and snippets.

View geowulf's full-sized avatar
🤍
WFH - Healthy Happy

Greg Woolf geowulf

🤍
WFH - Healthy Happy
  • Arizona
View GitHub Profile
@geowulf
geowulf / SublimeShortcuts.textile
Last active December 22, 2015 21:00
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (PC)

Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.

Editing

Ctrl+C copy current line (if no selection)
Ctrl+X cut current line (if no selection)
Ctrl+⇧+K delete line
Ctrl+↩ insert line after
@geowulf
geowulf / VS_Code_PC_Keyshorts.textile
Last active December 22, 2015 21:12
Visual Studio Code Useful Shortcuts (PC)

Visual Studio Code – Useful Shortcuts (PC)

Loosely ordered with the commands I use most towards the top. Microsoft also offers full documentation.

You can launch VS Code from the command line to quickly open a file, folder, or project. Typically, you open VS Code within the context of a folder. We find the best way to do this is to simply type:

code .

Editing

@geowulf
geowulf / BetterRefactors.md
Last active January 3, 2018 17:36
Promises: Better Refactors

Credit: Thomas Burleson

This is a good example of a flattened promise chain approach. But I do not like this solution because I had to create my success handlers as function wrappers that essentially only call another promise-returning API. It would be great if I could eliminate those tedious function wrappers… which seem like an unnecessary, extra layers!

This is also manifest at least two other anti-patterns:

  • we modified a $scope variable at each level; instead of a single-pass modification of all three (3) $scope variables.
  • getForecast() call references $scope.departure.date instead of an argument-passed reference.

Better Refactors What else can we do? What if we viewed each request-response as a self-contained process? Then we could chain processes…

@geowulf
geowulf / FlattenedPromiseChain.md
Last active July 20, 2018 10:32
Promises: Flattened Promise Chain

Credit: Thomas Burleson

Since promise handlers can return Promises, let’s use that technique to refactor an implementation:

var Dashboard = function( $scope, user, ServiceOne, ServiceTwo )
    {
        Service-1
            .getAddressInfo( user )                                              // Request #1
@geowulf
geowulf / ParallelChaining.md
Last active January 3, 2018 17:32
Promises: Parallel Chaining

Credit: Thomas Burleson

Finally, we should consider the dependencies of each segment of the chain. Notice that not all of our requests have to be sequential [and thus wait for all previous segments to finish first]. In our scenario, the Flight and Weather service calls could be requested in parallel [independent of each other].

parallel chaining getForecast() getDeparture() update$scope variables getFlight()

@geowulf
geowulf / Secure_Acceptance_Hosted_Checkout.md
Last active August 15, 2020 16:01
Documentation - WFPG Secure Acceptance Hosted Checkout
@geowulf
geowulf / Authorization.md
Last active August 15, 2020 16:54
SOAP API TESTS - Well Fargo Payment Gateway

TEST SOAP REQUEST

for an authorization of a Credit Card but exposes full PAN data. It is recommended that you use "tokenization".

This SOAP request is a sample provided by CyberSource and requires YOUR MERCHANT_ID & TRANSACTION_SECURITY_KEY within the SOAP Security Header

  • <wsse:Security> </wsse:Security> sub-nodes,
  • the version number (N.NN) in the xmlns property of the <requestMessage></requestMessage>
  • the MERCHANT_ID within the <merchantID></merchantID> node and some kind of meaningful reference code in the <merchantReferenceCode></merchantReferenceCode> node of the SOAP message which will allow for better tracking of the transaction.

Keybase proof

I hereby claim:

  • I am geowulf on github.
  • I am geowulf (https://keybase.io/geowulf) on keybase.
  • I have a public key ASAbEizFNObZSeh-zdbd0kEpnAHaQaMY-00F5vVjvdbkqgo

To claim this, I am signing this object:

@geowulf
geowulf / Simplified Guide CYBS SA Hosted Checkout.md
Last active January 4, 2025 02:35
A more simplified version of the "full guide" for SA Hosted Checkout

Simplified Guide to CyberSource Secure Acceptance Hosted Checkout

This guide explains how merchants can accept payments securely using CyberSource’s Hosted Checkout without needing to handle sensitive payment data themselves.

What is Hosted Checkout?

  • Hosted Checkout is a secure payment service that allows merchants to:
    • Accept online payments (e.g., credit cards, PayPal, eChecks).
    • Reduce the risk of handling sensitive payment details.
  • Easily integrate checkout pages into their websites with minimal coding.