- Create a folder at the root of your user home folder
(Example:
C:/Users/username/
) called.ssh
.
You can run something like:mkdir -p ~/.ssh
- Create the following files if they do not already exist (paths begin from the root of your user home folder):
- Make sure you have configured git tools: see configuring tools.
- Make sure you have updated git aliases: see how to register aliases.
After each commit in our branch, in order to be up-to-date with the integration branch.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* range() | |
* | |
* Returns an array of numbers between a start number and an end number incremented | |
* sequentially by a fixed number(step), beginning with either the start number or | |
* the end number depending on which is greater. | |
* | |
* @param {number} start (Required: The start number.) | |
* @param {number} end (Required: The end number. If end is less than start, | |
* then the range begins with end instead of start and decrements instead of increment.) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* High-order function that memoizes a function, by creating a scope | |
* to store the result of each function call, returning the cached | |
* result when the same inputs is given. | |
* | |
* @description | |
* Memoization is an optimization technique used primarily to speed up | |
* functions by storing the results of expensive function calls, and returning | |
* the cached result when the same inputs occur again. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Lightweight script to detect whether the browser is running in Private mode. | |
* @returns {Promise<boolean>} | |
* | |
* Live demo: | |
* @see https://output.jsbin.com/tazuwif | |
* | |
* This snippet uses Promises. If you want to run it in old browsers, polyfill it: | |
* @see https://cdn.jsdelivr.net/npm/es6-promise@4/dist/es6-promise.auto.min.js | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# To create in [.babun/]cygwin/usr/local/bin/subl with chmod +x | |
ARGS="" | |
while test $# -gt 0 | |
do | |
ARGS="$ARGS ${1#/cygdrive/[a-zA-Z]}"; # Remove /cygdrive and disk letter from the path | |
shift | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type FilterOperator = 'AND' | 'OR'; | |
type FiltersBy<T> = { | |
[K in keyof T]?: (value: T[K]) => boolean; | |
}; | |
/** | |
* Factory function that creates a specialized function to filter | |
* arrays, by validating all filters (AND operator), | |
* or validating just one of the filters (OR operator). | |
* @param operator Method to validate all filters: AND, OR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Sorts an array of objects In-Place, | |
* sorting by multiple fields sequentially. | |
* | |
* @description This function is meant to be used | |
* with arrays of objects, AND when you need to set | |
* multiple sorting criteria. For other cases it is | |
* recommended to use the native method `array.sort(callback)` | |
* since for simple cases this function is more expensive | |
* in time and memory. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @private | |
var isObject = (value) => | |
value != null && typeof value === 'object'; | |
/** | |
* @private | |
* Restores the one-level-depth object to the original nested object. | |
* | |
* @param {Array} names: list of keys in the object | |
* @param {any} value: the value of the object to transform |
NewerOlder