Skip to content
View monkpit's full-sized avatar
  • Dallas, Texas, USA
Block or Report

Block or report monkpit

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Please don't include any personal information such as legal names or email addresses. Maximum 100 characters, markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse

Pinned

  1. bulk-repo-changer bulk-repo-changer Public

    JavaScript 1

  2. Cross product of 2 javascript arrays Cross product of 2 javascript arrays
    1
    const {equals, flatten, join, map, pipe, unnest, xprod} = require('ramda');
    2
    const xprod2 = require('./xprod.js');
    3
    
                  
    4
    const urls = [
    5
      'stackexchange.com',
  3. NewRelic deploy via browser JS NewRelic deploy via browser JS
    1
    step('Trigger NewRelic marker', async (b: Browser) => {
    2
        const description = `Flood run started - ${ENV.FLOOD_SEQUENCE_ID}`;
    3
        await b.page.evaluate(
    4
            (_description, sequenceId) => {
    5
                const applicationId = '123';
  4. Typed Immutable Sort Typed Immutable Sort
    1
    export const immutableSort = <T>(array: T[], comparatorFn?: (a: T, b: T) => number): T[] =>
    2
        [...array].sort(comparatorFn);
    3
    
                  
    4
    describe('immutableSort', () => {
    5
        const testData = [4, 2, 5, -1, 0];
  5. Pluck props from array of objects wi... Pluck props from array of objects with JQ
    1
    echo '[
    2
      {"a": "a", "b": "b", "c": "c"},
    3
      {"a": "1", "b": "2", "c": "3"},
    4
      {"a": "x", "b": "y", "c": "z"}
    5
    ]' | jq ".[] | {b, c}"
  6. Numeric Prop Sorter - given a prop a... Numeric Prop Sorter - given a prop and an optional callback (for when equal values will be sub-sorted), returns a function to be passed to Array.sort
    1
    /**
    2
     * Creates a sort function that will compare based upon a certain property in an object.
    3
     *
    4
     * @param {keyof T} prop - the property of the object to sort by
    5
     * @param [options.order] the order to sort - either 'asc' or 'desc'