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
| <%-- 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; | |
| } |
| #!/usr/bin/env python | |
| # Reflects the requests from HTTP methods GET, POST, PUT, and DELETE | |
| # Written by Nathan Hamiel (2010) | |
| from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler | |
| from optparse import OptionParser | |
| class RequestHandler(BaseHTTPRequestHandler): | |
| def do_GET(self): |
| log.trace("A Trace msg"); | |
| log.debug("A Debug msg"); | |
| log.info("An Info msg"); | |
| log.warn("A Warn msg"); | |
| log.error("An Error msg"); |