- Open Automator
- Create a new document
- Select Quick Action
- Set “Service receives selected” to
files or foldersinany application - Add a
Run Shell Scriptaction- your default shell should already be selected, otherwise use
/bin/zshfor macOS 10.15 (”Catalina”) or later - older versions of macOS use
/bin/bash
- your default shell should already be selected, otherwise use
- if you're using something else, you probably know what to do 😉
The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.
This means you have the following choices:
- Use ESM yourself. (preferred)
Useimport foo from 'foo'instead ofconst foo = require('foo')to import the package. You also need to put"type": "module"in your package.json and more. Follow the below guide. - If the package is used in an async context, you could use
await import(…)from CommonJS instead ofrequire(…). - Stay on the existing version of the package until you can move to ESM.
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"; | |
| // delay a state change (used for loading or waiting for async to avoid flash of loading state) | |
| export default function useDelay(initial, { delay = 300, delayedValue = true, minDuration = 700 }) { | |
| const [state, setState] = React.useState(initial); | |
| const [change, setChange] = React.useState(initial); | |
| const end = React.useRef(0); | |
| React.useEffect(() => { | |
| let timer; |
Instructions to obtain WireGuard details of your NordVPN account. These can be used to setup a WireGuard tunnel on your router to NordVPN.
Source: https://forum.gl-inet.com/t/configure-wireguard-client-to-connect-to-nordvpn-servers/10422/27
If you have any linux machine, use that or install a vm if you don't have one.
Get their official linux app installed. Make sure you have wireguard installed too. And set the used technology to Nordlynx by running nordvpn set technology nordlynx
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
| #! Aaaaaaaaaaa this is JS!!! | |
| // https://github.com/tc39/proposal-hashbang | |
| // This file is mixing all new syntaxes in the proposal in one file without considering syntax conflict or correct runtime semantics | |
| // Enjoy!!! | |
| // Created at Nov 23, 2018 | |
| for await(const x of (new A // https://github.com/tc39/proposal-pipeline-operator | |
| |> do { // https://github.com/tc39/proposal-do-expressions | |
| case(?) { // https://github.com/tc39/proposal-pattern-matching | |
| when {val}: class { |
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
| class Spiderman { | |
| lookOut() { | |
| alert('My Spider-Sense is tingling.'); | |
| } | |
| } | |
| let miles = new Spiderman(); | |
| miles.lookOut(); |
Install, build and debug a react native app in WSL2 (Windows Subsystem for Linux) and Ubuntu.
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, { Component } from 'react'; | |
| import WaveSurfer from 'wavesurfer.js'; | |
| import { WaveformContianer, Wave, PlayButton } from './Waveform.styled'; | |
| class Waveform extends Component { | |
| state = { | |
| playing: false, | |
| }; |
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
| # Bypass MacOS Gatekeeper | |
| #------------------------ | |
| #usage: xattr [-l] [-r] [-s] [-v] [-x] file [file ...] | |
| # xattr -p [-l] [-r] [-s] [-v] [-x] attr_name file [file ...] | |
| # xattr -w [-r] [-s] [-x] attr_name attr_value file [file ...] | |
| # xattr -d [-r] [-s] attr_name file [file ...] | |
| # xattr -c [-r] [-s] file [file ...] |
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
| #!/bin/bash | |
| #get highest tag number | |
| VERSION=`git describe --abbrev=0 --tags` | |
| #replace . with space so can split into an array | |
| VERSION_BITS=(${VERSION//./ }) | |
| #get number parts and increase last one by 1 | |
| VNUM1=${VERSION_BITS[0]} |