I hereby claim:
- I am openam on github.
- I am openam (https://keybase.io/openam) on keybase.
- I have a public key ASB6PCk7-1_Qo8LqHABHiWGB3ollnif5gYem9RO_TNbdKAo
To claim this, I am signing this object:
| // Types for the result object with discriminated union | |
| type Success<T> = [T, null] | |
| type Failure<E> = [null, E] | |
| type Result<T, E = Error> = Success<T> | Failure<E>; | |
| // Main wrapper function | |
| export async function tryCatch<T, E = Error>( | |
| promise: Promise<T>, | |
| ): Promise<Result<T, E>> { | |
| try { |
I hereby claim:
To claim this, I am signing this object:
Prereq:
apt-get install zsh
apt-get install git-coreInstall oh-my-zsh.
| #!/bin/bash | |
| if [[ $# -lt 2 ]]; then | |
| echo " | |
| Usage: compare-branches baseBranch compareBranch | |
| Shows what commits exist in the second branch that are not in the first" | |
| exit | |
| fi |
| app.filter( 'bytes', function bytesFilter () { | |
| 'use strict'; | |
| return function bytesReturn ( bytes, precision ) { | |
| if ( bytes === 0 ) { | |
| return '0 bytes'; | |
| } | |
| if ( isNaN( parseFloat( bytes ) ) || !isFinite( bytes ) ) { | |
| return '-'; |
| #!/bin/sh | |
| lessc css/styles.less > css/styles.css --source-map=css/styles.css.map --source-map-basepath=css/ | |
| NOW=$(date) | |
| echo "Recompiling less completed $NOW" |
| <?php | |
| /** | |
| * get_directories description | |
| * | |
| * @param string $path the path to start from | |
| * @param string $regex that the directories must match, use empty string '' for all | |
| * @return array of directories in the path | |
| */ | |
| function get_directories($path = '.', $regex = '') { | |
| $list = array(); |
| <?php | |
| /** | |
| * debug is a simple function to show which line and file a debug call came from | |
| * including the contents of print_r() wrapped in a <pre> tag | |
| * | |
| * @param string $value | |
| * @return void | |
| */ | |
| function debug($value = '') { | |
| $backtrace = debug_backtrace(); |
| <?php | |
| /** | |
| * @category PHP4 DirectoryIterator class | |
| * @version 0.0.1 | |
| * @author Adrian Rotea <adirotea@yahoo.com> | |
| * @copyright Copyright © 2005, Adrian Rotea <adirotea@yahoo.com> | |
| * @link http://www.weberdev.com/get_example.php3?ExampleID=4180 | |
| * | |
| * This class implements the SPL DirectoryIterator in PHP4. | |
| * Very usefull if wanting to traverse directories in an OO style |