Debug Modern JavaScript with VSCode. Part of VSCode Course.
npm init -y
# # # # # # # # # # # | |
# Personal aliases: # | |
# # # # # # # # # # # | |
# Everyday | |
# Speak the truth | |
alias saga="say 'Why not use a saga'" | |
# Git aliases | |
alias g='git' |
// Example | |
// Thanks to Aby for the idea / inital code nippet | |
// https://sketchplugins.com/d/201-inserting-a-layer-into-a-document-with-sketch-ux/7 | |
context.document.actionsController().actionForID("MSShowReplaceColorSheetAction").performAction(nil); | |
// there may be cases where you need to pass in a reference to an object in order for the for the action to work | |
// here is how you can insert a symbol instance programmatically | |
// for now let's assume you have a symbol master selected |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" Font | |
:set guifont=Source\ Code\ Pro:h14 | |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" Hide pointless junk at the bottom, doesn't work in .vimrc for some reason? | |
:set laststatus=0 | |
:set noshowmode "don't show --INSERT-- | |
:set noruler "don't show line numbers/column/% junk |
Debug Modern JavaScript with VSCode. Part of VSCode Course.
npm init -y
import { withRouter } from 'next/router'; | |
import Link from 'next/link'; | |
import React, { Children } from 'react'; | |
const ActiveLink = ({ router, children, ...props }) => { | |
const child = Children.only(children); | |
let className = child.props.className || ''; | |
if (router.pathname === props.href && props.activeClassName) { | |
className = `${className} ${props.activeClassName}`.trim(); |
--> Star this gist if you want to see it on the Reactive 2016 conference <--
Writing React.js is fun... But being able to draw React components, design responsive layouts and create entire app flows visually can be even more fun! (Especially for those non-coder members of your team who think ECMAScript 6 is a skin disease. They should see the light of React too.)
In this lightning talk, we'll give you a world premiere sneak peek at React Studio (www.reactstudio.com), a GUI tool built specifically for React. We'll explain how React's functional design makes it a great fit for visual tools. Also we will show how React Studio's plugin approach makes it a really powerful meta-programming system. Want to switch your app from Redux to Alt.js or vice versa? Just swap the state plugin and export again! That's just one of the joys of using a visual system for your Reactified visual design.
Thanks to HAP-NodeJS
Service | UUID |
---|---|
Accessory Information | 0000003E-0000-1000-8000-0026BB765291 |
Air Quality Sensor | 0000008D-0000-1000-8000-0026BB765291 |
Battery Service | 00000096-0000-1000-8000-0026BB765291 |
Bridging State | 00000062-0000-1000-8000-0026BB765291 |
/* | |
This script is meant to be used with a Google Sheets spreadsheet. When you edit a cell containing a | |
valid CSS hexadecimal color code (like #000 or #000000), the background color will change to that | |
color and the font color will be changed to the inverse color for readability. | |
To use this script in a Google Sheets spreadsheet: | |
1. go to Tools » Script Editor; | |
2. replace everyting in the text editor with this code; | |
3. click File » Save; |
#!/usr/bin/env bash | |
# ~/.osx — http://mths.be/osx | |
# Ask for the administrator password upfront | |
sudo -v | |
# Keep-alive: update existing `sudo` time stamp until `.osx` has finished | |
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & |
# Add the following lines of code to your `~/.bash_profile`, | |
# and then run `source ~/.bash_profile` to be able to execute | |
# this from the command line. | |
openx() { | |
fileToOpen=''; | |
for file in `find . -maxdepth 1 -name *.xcworkspace`; do | |
fileToOpen=$file | |
done |