testGistEditor(‘How is it doing?’)
This file contains hidden or 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
call plug#begin(stdpath('data') . './plugged') | |
" Plugin Section | |
Plug 'dracula/vim' | |
Plug 'kristijanhusak/vim-hybrid-material' | |
Plug 'preservim/nerdtree' | |
Plug 'ryanoasis/vim-devicons' | |
Plug 'neoclide/coc.nvim', {'branch': 'release'} | |
Plug 'junegunn/fzf', {'dir': '~/.fzf','do': './install --all'} | |
Plug 'junegunn/fzf.vim' " needed for previews |
This file contains hidden or 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
fun <T> assert (exerciseName: String, fnResult: T, expectedResult: T) { | |
if (fnResult == expectedResult) { | |
println(exerciseName + "| checks out, GOOD JOB\n\n"); | |
} else { | |
println(exerciseName + "| something's wrong: result \n (" + fnResult + ") is not equal to expected result \n (" + expectedResult + ")\n\n" ) | |
}; | |
}; | |
/** Problem #1 - List Basics | |
* 1) Function is provided with a list of numbers; |
This file contains hidden or 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
use raylib::prelude::*; | |
#[allow(unused_macros)] | |
macro_rules! color { | |
(# $color_hex:expr) => {{ | |
let color = i32::from_str_radix(stringify!($color_hex), 16).unwrap(); | |
let b = color % 0x100; | |
let g = (color - b) / 0x100 % 0x100; | |
let r = (color - g) / 0x10000; |
This file contains hidden or 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
// testing using Jest | |
import { frac } from './frac'; | |
describe('Math frac tests', () => { | |
it('should be defined', () => { | |
expect(frac).toBeDefined(); | |
}); | |
it('should accurately calculate fraction of a number', () => { | |
expect( frac(-3.1234) ).toEqual( -0.1234 ); |
This file contains hidden or 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
interface BarkAndWiggle { | |
bark: () => void; | |
wiggle: () => void; | |
}; | |
class Pitbull implements BarkAndWiggle { | |
public bark() { | |
console.log('bark'); | |
} |
This file contains hidden or 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
/** | |
* This is a workaround for the following issue: | |
* https://github.com/facebook/draft-js/issues/1394 | |
**/ | |
type DecoratorProps = { | |
// draft-js provides decorators with detoratedText property | |
decoratedText: string; | |
} |
This file contains hidden or 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
import * as React from 'react'; | |
import { mount } from 'enzyme'; | |
import { serialize, deserialize } from './react-seritalize'; | |
class CustomComponent extends React.Component<any, any> { | |
render () { | |
return <div className="CustomComponent" >{this.props.children}</div> | |
} | |
} |