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
const fs = require('fs'); | |
const depcheck = require('depcheck'); | |
const options = { | |
ignoreBinPackage: false, | |
ignoreDirs: [ | |
'client', | |
], | |
parsers: { // the target parsers |
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
# This is the version that came packaged with my version of CLion: | |
cmake_minimum_required(VERSION 3.7) | |
# I'm giving the project an arbitrary name for demonstration purposes, | |
# you can name it whatever you want: | |
project(example) | |
# Create a src directory at the root level of your project and add a | |
# file with whatever name you want (I used the project name for | |
# simplicity): |
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
const setup = (propOverrides, renderFn = shallow) => { | |
const props = { | |
propA: 'Some Value', | |
propB: false, | |
onClick: jest.fn(), | |
...propOverrides, | |
}; | |
const wrapper = renderFn(<AppComponent {...props} />); |
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
describe('Component A', () => { | |
describe('Snapshot validation', () => { | |
it('matches its snapshot with valid props', () => { | |
const { wrapper } = setup(); | |
expect(wrapper).toMatchSnapshot(); | |
}); | |
}); | |
describe('Event validation', () => { | |
it('fires props.onClick when button is clicked', () => { |
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
const fs = require('fs'); | |
const path = require('path'); | |
const chalk = require('chalk'); | |
const sh = require('shelljs'); | |
const _ = require('lodash'); | |
const sourcePath = path.resolve(process.cwd(), 'src'); | |
// This is the new /src/redux folder that gets created: | |
const reduxPath = path.resolve(sourcePath, 'redux'); |
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 transactions = [ | |
{ | |
"id": 1000, | |
"transactionDate": "2017-08-02", | |
"toFrom": "Uncle Buck's Insurance", | |
"type": "Withdrawal", | |
"category": "Insurance", | |
"rawAmount": -1200, | |
"cookedAmount": -1000, | |
"description": "Insurance for business" |
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
# You can also add these to your .bash_profile file, just make sure | |
# you update the versions of anything that doesn't match (i.e. emscripten | |
# is version 1.37.14, but it may be different for you). | |
export EM_CONFIG="$HOME/.emscripten" | |
export EMSDK="$HOME/Tooling/emsdk" | |
export EM_CONFIG="$HOME/.emscripten" | |
export EMSCRIPTEN="$HOME/Tooling/emsdk/emscripten/1.37.14" | |
export BINARYEN_ROOT="$HOME/Tooling/emsdk/clang/e1.37.14_64bit/binaryen" | |
export PATH="$PATH:$HOME/Tooling/emsdk:$HOME/Tooling/emsdk/emscripten/1.37.14:$HOME/Tooling/emsdk/node/4.1.1_64bit/bin:$HOME/Tooling/emsdk/clang/e1.37.14_64bit" |
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
' Copyright (C) 2016 Mike Rourke | |
' Permission is hereby granted, free of charge, to any person obtaining a copy | |
' of this software and associated documentation files (the "Software"), to deal | |
' in the Software without restriction, including without limitation the rights | |
' to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
' copies of the Software, and to permit persons to whom the Software is | |
' furnished to do so, subject to the following conditions: | |
' The above copyright notice and this permission notice shall be included in |
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
{ | |
"name": "some-name", | |
"productName": "The Product", | |
"version": "1.0.0", | |
"main": "src/main/main.ts", | |
"author": "Biscuits O'Shea", | |
"license": "PRIVATE", | |
"private": true, | |
"scripts": { | |
"build": "webpack --mode production --progress", |
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
program debt_prioritizer | |
implicit none | |
type debtor | |
character(len=:), allocatable :: name | |
integer :: debt | |
end type debtor | |
! Ugh! Global variables!? | |
! Originally, I was passing the "debtors" and "debtor_count" |
OlderNewer