Skip to content

Instantly share code, notes, and snippets.

View damonbauer's full-sized avatar

Damon Bauer damonbauer

View GitHub Profile
@damonbauer
damonbauer / SomeTest.ts
Last active July 23, 2023 16:09
react-native-blob-util mock
import ReactNativeBlobUtil from 'react-native-blob-util';
describe('SomeTest', () => {
beforeEach(() => {
jest.clearAllMocks();
});
it('handles errors', () => {
ReactNativeBlobUtil.config.mockReturnValueOnce({
fetch: jest.fn().mockReturnValue({
@damonbauer
damonbauer / Preferences.sublime-settings
Last active December 17, 2015 20:39
Sublime Text User Preferences
{
"bold_folder_labels": true,
"caret_style": "phase",
"color_scheme": "Packages/Theme - Cobalt2/cobalt2.tmTheme",
"command": "toggle_overwrite",
"fade_fold_buttons": false,
"folder_exclude_patterns":
[
"bin",
".sass-cache",
@damonbauer
damonbauer / incrementing-color.scss
Created February 22, 2014 20:10
Incrementing color SCSS mixin. Pass in a number count to loop and a color to increment. However you decide to increment (darker, lighter, opaque, etc) is up to you. Example shows incrementing an anchor in a list item receiving a darker background color.
@mixin bgColor($count, $color) {
$loop_color: $color;
@for $i from 0 through $count {
$loop_color: shade($loop_color, 8%);
li:nth-of-type(#{$i}) > a {
background-color: $loop_color;
}