Selectively applying path markers from a simple collection.
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 React from 'react/addons'; | |
| const TestUtils = React.addons.TestUtils; | |
| export default createComponent; | |
| function createComponent(component, props, ...children) { | |
| const shallowRenderer = TestUtils.createRenderer(); | |
| shallowRenderer.render(React.createElement(component, props, children.length > 1 ? children : children[0])); | |
| return shallowRenderer.getRenderOutput(); | |
| } |
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 strict'; | |
| var React = require('react/addons'); | |
| var AnimateMixin = require('react-animate'); | |
| /** | |
| * Accordion object that maintains a list of content containers and their collapsed or expanded state | |
| * @type {*|Function} | |
| */ | |
| var Accordion = React.createClass({ | |
| /** |
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
| var backendData = [ | |
| { | |
| "title":"Section 1", | |
| "content":"Our content for the section 1" | |
| }, | |
| { | |
| "title":"Section 2", | |
| "content":"Our content for the section 2" | |
| }, | |
| { |
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
| const React = require('react'); | |
| const _ = require('lodash'); | |
| var model = new falcor.Model({ | |
| cache: { | |
| movies: [ | |
| { | |
| title: "Daredevil", | |
| plot: "Marvel lol", | |
| year: "2015-", |
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
| // Package main is a sample macOS-app-bundling program to demonstrate how to | |
| // automate the process described in this tutorial: | |
| // | |
| // https://medium.com/@mattholt/packaging-a-go-application-for-macos-f7084b00f6b5 | |
| // | |
| // Bundling the .app is the first thing it does, and creating the DMG is the | |
| // second. Making the DMG is optional, and is only done if you provide | |
| // the template DMG file, which you have to create beforehand. | |
| // | |
| // Example use: |
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
| var fs = require("fs"); | |
| var path = require("path"); | |
| // Config params (relative to where npm/script is called from): | |
| const APP_BASE = './src'; | |
| const ENTRY_FILE = `index.tsx`; | |
| const OUTPUT_DIR = './build'; | |
| const OUTPUT_FILE = 'app.js'; | |
| const IS_DEV = false; | |
| const TARGET = 'es2018'; |
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
| const bs = require('browser-sync').create(); | |
| // Config params (relative to where npm/script is called from): | |
| const PORT = 3000; | |
| const OUTPUT_DIR = './build'; | |
| bs.watch(`${OUTPUT_DIR}/**/*.js`, function (event, file) { | |
| bs.reload("*.js"); | |
| }) |
Note that I have not tried all of these personally, and cannot and do not vouch for all of the tools listed here. In most cases, the descriptions here are copied directly from their code repos. Some may have been abandoned. Investigate before installing/using.
The ones I use regularly include: bat, dust, exa, fd, hyperfine, miniserve, ripgrep, just, zoxide and cargo-wipe.
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
| programs.starship = { | |
| enable = true; | |
| settings = { | |
| # "$schema" = "https://starship.rs/config-schema.json"; | |
| add_newline = true; | |
| command_timeout = 500; | |
| continuation_prompt = "[∙](bright-black) "; | |
| format = "[](0x9A348E)$username$hostname$localip$shlvl$singularity$kubernetes[](fg:0x9A348E bg:0xDA627D)$directory$vcsh[](fg:0xDA627D bg:0xFCA17D)$git_branch$git_commit$git_state$git_metrics$git_status$hg_branch[](fg:0x86BBD8 bg:0x06969A)$docker_context$package$buf[](fg:0xFCA17D bg:0x86BBD8)$c$cmake$cobol$container$daml$dart$deno$dotnet$elixir$elm$erlang$golang$haskell$helm$java$julia$kotlin$lua$nim$nodejs$ocaml$perl$php$pulumi$purescript$python$rlang$red$ruby$rust$scala$swift$terraform$vlang$vagrant$zig$nix_shell$conda$spack$memory_usage$aws$gcloud$openstack$azure$env_var$crystal$custom$sudo$cmd_duration$line_break$jobs$battery[](fg:0x06969A bg:0x33658A)$time$status$shell$character"; | |
| right_format = ""; | |
| scan_timeout = 30; |