A brief example on how to use npx to run gist based scripts.
Read the article here https://neutrondev.com/npm-vs-npx-whats-the-difference/ or watch it on YouTube https://www.youtube.com/watch?v=fSHWc8RTJug
| [*] | |
| charset = utf-8 | |
| end_of_line = lf | |
| indent_size = 4 | |
| indent_style = space | |
| insert_final_newline = true | |
| max_line_length = 120 | |
| tab_width = 4 | |
| trim_trailing_whitespace = true | |
| ij_continuation_indent_size = 8 |
| # ============================================= | |
| # Windows 개발 환경 완전 자동화 설치 스크립트 | |
| # (Git 초기 설정만 수동 입력, 나머지는 unattended) | |
| # ============================================= | |
| # 관리자 권한 확인 | |
| if (-not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) { | |
| Write-Host "관리자 권한으로 다시 실행해주세요." | |
| exit | |
| } |
| <%-- version1: java style --%> | |
| <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> | |
| <%@page import="java.util.Date"%> | |
| <%@page import="java.util.Calendar"%> | |
| <% pageContext.setAttribute("currentYear", java.util.Calendar.getInstance().get(java.util.Calendar.YEAR)); %> | |
| Current year is: <c:out value="${currentYear}" /> | |
| <%-- version2: JSTL style --%> | |
| <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> |
A brief example on how to use npx to run gist based scripts.
Read the article here https://neutrondev.com/npm-vs-npx-whats-the-difference/ or watch it on YouTube https://www.youtube.com/watch?v=fSHWc8RTJug
| # sudo apt-get install pv | |
| $ pv app.js | nc 192.168.1.123 10000 |
First of all, please note that token expiration and revoking are two different things.
A JWT token that never expires is dangerous if the token is stolen then someone can always access the user's data.
Quoted from JWT RFC:
| const time_start = new Date().getTime(); | |
| // some function | |
| const time_end = new Date().getTime(); | |
| console.log(`search elapsed time ==> ${(time_end - time_start) / 1000}s`); |
| # Explanation : https://blog.1234.co.kr/2021/07/24/jenkins-as-a-docker-container-agent-role/ | |
| FROM ubuntu:20.04 | |
| # First off, replace ubuntu repository for fast download. | |
| # Check the official ubuntu repository mirror site | |
| # https://launchpad.net/ubuntu/+archivemirrors | |
| RUN sed --in-place 's/archive.ubuntu.com/mirror.kakao.com/g' /etc/apt/sources.list | |
| RUN apt update && apt upgrade -y |
| public class Formatter { | |
| /** | |
| * The next piece of code is not formatted | |
| * because of the @formatter annotations. | |
| */ | |
| // @formatter:off | |
| public void nonFormattedMethod() { | |
| int sum = 1 + 2 + 3 + 4 + 5; | |
| } |