To run this, you can try:
curl -ksO https://gist.githubusercontent.com/nicerobot/2697848/raw/uninstall-node.sh
chmod +x ./uninstall-node.sh
./uninstall-node.sh
rm uninstall-node.sh
| // All navigation that is relative should be passed through the navigate | |
| // method, to be processed by the router. If the link has a `data-bypass` | |
| // attribute, bypass the delegation completely. | |
| $(document).on("click", "a[href]:not([data-bypass])", function(evt) { | |
| // Get the absolute anchor href. | |
| var href = { prop: $(this).prop("href"), attr: $(this).attr("href") }; | |
| // Get the absolute root. | |
| var root = location.protocol + "//" + location.host + Application.root; | |
| // Ensure the root is part of the anchor href, meaning it's relative. |
To run this, you can try:
curl -ksO https://gist.githubusercontent.com/nicerobot/2697848/raw/uninstall-node.sh
chmod +x ./uninstall-node.sh
./uninstall-node.sh
rm uninstall-node.sh
| var str = "The quick brown fox jumped over the box like an ox with a sox in its mouth"; | |
| str.match(/\w(ox)/g); // ["fox", "box", "sox"] | |
| // match (when used with a 'g' flag) returns an Array with all matches found | |
| // if you don't use the 'g' flag then it acts the same as the 'exec' method. | |
| str.match(/\w(ox)/); // ["fox", "ox"] | |
| /\w(ox)/.exec(str); // ["fox", "ox"] |
| # put this in your .bash_profile | |
| if [ $ITERM_SESSION_ID ]; then | |
| export PROMPT_COMMAND='echo -ne "\033];${PWD##*/}\007"; ':"$PROMPT_COMMAND"; | |
| fi | |
| # Piece-by-Piece Explanation: | |
| # the if condition makes sure we only screw with $PROMPT_COMMAND if we're in an iTerm environment | |
| # iTerm happens to give each session a unique $ITERM_SESSION_ID we can use, $ITERM_PROFILE is an option too | |
| # the $PROMPT_COMMAND environment variable is executed every time a command is run | |
| # see: ss64.com/bash/syntax-prompt.html |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent| interface ZendeskWidget { | |
| ( | |
| type: 'webWidget:on' | 'webWidget' | 'webWidget:get', | |
| command: string, | |
| payload?: any, | |
| ): void; | |
| ( | |
| type: 'webWidget', | |
| command: 'updateSettings', | |
| payload: ZendeskSettings, |
| import React, { useState, useCallback } from "react"; | |
| import Highcharts, { Chart as HighchartsChart } from "highcharts"; | |
| import HighchartsReact from "highcharts-react-official"; | |
| import { Tooltip } from "./Tooltip"; | |
| const options = { | |
| title: { | |
| text: "Custom tooltip as React component" | |
| }, | |
| series: [ |
| // Credit Ryan Carniato https://frontendmasters.com/courses/reactivity-solidjs/ | |
| let context = []; | |
| export function untrack(fn) { | |
| const prevContext = context; | |
| context = []; | |
| const res = fn(); | |
| context = prevContext; | |
| return res; |