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
View docs.md

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
tsukhu / Steps.md
Last active Aug 7, 2019
create-react-app with styled components
View Steps.md

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
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
DavidWells / css-with-react-checklist.md
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.
View css-with-react-checklist.md

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
lesander / git-history.sh
Created Jan 25, 2017
Get the history between two tags, commits or releases in nicely formatted markdown.
View git-history.sh
#!/bin/bash
# By Sander Laarhoven <sander@laarhoven.org>
# Usage: ./git-history.sh tag
# Where 'tag' is the previous release or version.
# This script compares with HEAD by default.
currentTag="HEAD"
previousTag=$1
fullName="John\ Doe"
userName="MyGitHubUsername"
@dceddia
dceddia / config-overrides.dev.js
Created Dec 6, 2016
Customize Create React App without ejecting
View config-overrides.dev.js
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
Hendrixer / editor.css
Last active Jul 6, 2019
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, .tab.active, .title-actions, .tablist, .tabs-container, .tabs, .composite.title {
background-color: rgba(40, 44, 52, 1) !important;
}
.tab.active, .tab {
border-right: 0px !important;
@ryanflorence
ryanflorence / Performance Conditionally Rendered Content in React.md
Last active Mar 8, 2019
Performance Conditionally Rendered Content in React
View Performance Conditionally Rendered Content in React.md

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
svinkle / screencast-with-voiceover.md
Last active Jun 24, 2019
Screencast with VoiceOver
View screencast-with-voiceover.md

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.

Setup

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.

Steps

You can’t perform that action at this time.