-
Locate the path to the interpreter for the language you are writing in with the
whichcommand.which node which python which bash which ruby -
Add that path as an interpreter directive (using
#!) on the first line of your script. For example if you want to write a node script andwhich nodereturned/usr/local/bin/node, the first line of your script should be:
-
What is HTML?
HTML (Hypertext Markup Language) is the standard language used to create and design documents on the web. It structures content using elements or tags. -
What are the building blocks of HTML5?
The building blocks of HTML5 include elements like<header>,<footer>,<section>,<article>, and<nav>which enhance semantic meaning and accessibility. -
What is the purpose of the `` element in HTML?
| #!/usr/bin/env bash | |
| # print usage | |
| DOMAIN=$1 | |
| if [ -z "$1" ]; then | |
| echo "USAGE: $0 domain.lan" | |
| echo "" | |
| echo "This will generate a non-secure self-signed wildcard certificate for given domain." | |
| echo "This should only be used in a development environment." |
| #!/bin/sh | |
| # @author: Alexandre Plennevaux | |
| # @description: MIRROR DISTANT FOLDER TO LOCAL FOLDER VIA FTP | |
| # | |
| # FTP LOGIN | |
| HOST='sftp://ftp.domain.com' | |
| USER='ftpusername' | |
| PASSWORD='ftppassword' | |
| # DISTANT DIRECTORY |
| ## Pre-requisite: You have to know your last commit message from your deleted branch. | |
| git reflog | |
| # Search for message in the list | |
| # a901eda HEAD@{18}: commit: <last commit message> | |
| # Now you have two options, either checkout revision or HEAD | |
| git checkout a901eda | |
| # Or | |
| git checkout HEAD@{18} |
| # Simple No-ip.com Dynamic DNS Updater | |
| # | |
| # By Nathan Giesbrecht (http://nathangiesbrecht.com) | |
| # | |
| # 1) Install binary as described in no-ip.com's source file (assuming results in /usr/local/bin) | |
| # 2) Run sudo /usr/local/bin/noip2 -C to generate configuration file | |
| # 3) Copy this file noip2.service to /etc/systemd/system/ | |
| # 4) Execute `sudo systemctl daemon-reload` | |
| # 5) Execute `sudo systemctl enable noip2` | |
| # 6) Execute `sudo systemctl start noip2` |
| // Tell terminal where FileMerge lives. | |
| sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer | |
| // Configure git to use FileMerge | |
| git config --global merge.tool opendiff | |
| // Run mergetool | |
| git mergetool |
DEPRECATED as of macOS 10.13 (High Sierra). See the new GUIDE to install nvm and yarn for macOS (updated July 2019)
Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.
This solution fixes the error caused by trying to run npm update npm -g. Once you're finished, you also won't need to use sudo to install npm modules globally.
Note: This is the guide for v 2.x.
For the v3, please follow this url: https://blog.csdn.net/sam_shan/article/details/80585240 Thanks @liy-cn for contributing.
For the v6, please follow the comment below: https://gist.github.com/trandaison/40b1d83618ae8e3d2da59df8c395093a?permalink_comment_id=5079514#gistcomment-5079514
Download: StarUML.io
| /* | |
| JPA (Java Persistence API) | |
| Transaction Management with an Entity-Mananger: | |
| --- | |
| entityManager.getTransaction().begin(); | |
| entityManager.persist(<some-entity>); | |
| entityManager.getTransaction().commit(); | |
| entityManager.clear(); |