Skip to content

Instantly share code, notes, and snippets.

Coding things

Brett Jankord bjankord

Coding things
Block or report user

Report or block bjankord

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View extension.js
const vscode = require('vscode');
const shelljs = require('shelljs');
// This extension is a hack to explore a possible VsCode way to search
// for a directory name.
// In IntelliJ you can search for a directory by ending the search string with '/'.
// In Vim, you can `:call fzf#run({'source': 'fd -t d', 'sink': 'NERDTreeFind'})`
// But VsCode doesn't seem to provide an API to open the current

Get all packages

Get all packages by running lerna ls. Convert this to an array Save array as a const named all.

Get updated packages

Get updated package by running lerna updated Convert this to an array Save array as a const named updated.

tsukhu /
Last active Jan 15, 2020
create-react-app with styled components

Here are the steps to convert the create-react-app generated to code to use styled components instead of css

  1. Created an app using create-react-app
create-react-app react-styledcomponents-app
  1. Install styled-components as a dependency
bjankord / find-and-replace-script.js
Last active Jul 12, 2019
Changelog find and replace script
View find-and-replace-script.js
#!/usr/bin/env node
/* eslint-disable no-console */
/* eslint import/no-extraneous-dependencies: ["error", {"devDependencies": true}] */
const fs = require('fs');
const path = require('path');
const packagePaths = require('../peer-dependency-generator/getPackagePaths');
const findAndReplace = require('../peer-dependency-generator/findAndReplace');
// Generate the markdown to display peerDependencies information for each package
packagePaths.forEach((packagePath) => {
DavidWells /
Last active Nov 21, 2018
Lots of talk about different CSS solutions for React. This gist attempts to shed light on pros/cons of approaches.

Here is a checklist of all the things I need my CSS solution to handle.

I can explain any of the points. Leave a comment on the gist or tweet @DavidWells

Challenge: Take your favorite CSS solution and see how the checklist holds up.

  • Has ability Localize classes
  • Has ability to use global classes
  • Has ability to write raw CSS
  • Syntax highlighting and auto completion
lesander /
Created Jan 25, 2017
Get the history between two tags, commits or releases in nicely formatted markdown.
# By Sander Laarhoven <>
# Usage: ./ tag
# Where 'tag' is the previous release or version.
# This script compares with HEAD by default.
fullName="John\ Doe"
dceddia /
Created Dec 6, 2016
Customize Create React App without ejecting
module.exports = function(config) {
// Generate sourcemaps
config.devtool = 'source-map';
// Compile i18n messages throughout the project into JSON files
config.module.loaders[0].query.plugins = [
["react-intl", {
"messagesDir": "./build/messages/"
Hendrixer / editor.css
Last active Jan 13, 2020
VS code custom CSS for theme
View editor.css
.composite-title, .composite-title, .vs-dark .monaco-workbench>.activitybar>.content {
background-color: rgba(40, 44, 52, 1) !important;
.tabs-container, .tab,, .title-actions, .tablist, .tabs-container, .tabs, .composite.title {
background-color: rgba(40, 44, 52, 1) !important;
}, .tab {
border-right: 0px !important;
ryanflorence / Performance Conditionally Rendered Content in
Last active Mar 8, 2019
Performance Conditionally Rendered Content in React
View Performance Conditionally Rendered Content in

Performance and Conditionally Rendered Content in React

First, this is not about if in JSX. It's just the simplest example to talk about (and a lot of people tried to do it at first a long time ago).

Some react components conditionally render content. When React first went public, a lot of us coming from handlebars really wanted "if" syntax. This gist isn't just about If components though, it's about

svinkle /
Last active Jun 24, 2019
Screencast with VoiceOver

Screencast with VoiceOver

Here’s a quick how-to on recording your Mac desktop while using the VoiceOver screen reader. With this setup you’ll be able to capture both video and internal audio at the same time, and hear the audio output while recording.


For this setup we’ll be on OS X El Capitan and use QuickTime to capture the video and audio. The only extra thing required is the iShowU Audio Capture driver.


You can’t perform that action at this time.