View stdout-monkeypatch.ts
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
var origWrite = process.stdout.write; | |
function monkey(callback){ | |
// callback = callback).function || function(){ }; | |
return ({ | |
patch : function(cb){ | |
var self = this; | |
this.state = { patched : true }; |
View next-recurse.ts
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
/** | |
Will find the next/prev element from an array based on given element. Will loop back to first/last if given step value exceeds | |
the bounds of the items | |
@remarks | |
{@link https://tinyurl.com/r3nhday | GH Gist url} | |
@example | |
```ts |
View styled-system.d.ts
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
/** | |
* to augment missing styled-system types. @see here - https://tinyurl.com/y5e4bl3f | |
*/ | |
// "wipe over" the existing module definitions in @types/styled-system with this declare | |
declare module "styled-system" { | |
// Type definitions for styled-system 4.2 | |
// Project: https://github.com/jxnblk/styled-system#readme |
View gist:5e44255ca75db8083af2fda186869187
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
// https://bambielli.com/til/2018-01-07-mocking-constructors/ | |
const stackDriverSpy = jest.fn(() => ({})) | |
jest.genMockFromModule('@google-cloud/logging-winston') | |
jest.mock('@google-cloud/logging-winston') | |
const winstonLoggingModule = require('@google-cloud/logging-winston') | |
winstonLoggingModule.mockImplementation(stackDriverSpy) |
View cloudSettings
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
{"lastUpload":"2017-11-24T17:25:27.366Z","extensionVersion":"v2.8.6"} |
View gist:0f760a99338f4e016373356f5b2c8493
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
/** | |
* $args example: | |
* array(3) { | |
[0]=> | |
string(15) "wiremock:record" | |
["feed"]=> | |
string(5) "CORAL" | |
["background"]=> | |
bool(true) | |
} |