#! /bin/bash | |
# [get_golang.sh](https://gist.github.com/n8henrie/1043443463a4a511acf98aaa4f8f0f69) | |
# Download latest Golang release for AMD64 | |
# https://dl.google.com/go/go1.10.linux-amd64.tar.gz | |
set -euf -o pipefail | |
# Install pre-reqs | |
sudo apt-get install python3 git -y | |
o=$(python3 -c $'import os\nprint(os.get_blocking(0))\nos.set_blocking(0, True)') |
The PATH
is an important concept when working on the command line. It's a list
of directories that tell your operating system where to look for programs, so
that you can just write script
instead of /home/me/bin/script
or
C:\Users\Me\bin\script
. But different operating systems have different ways to
add a new directory to it:
- The first step depends which version of Windows you're using:
- If you're using Windows 8 or 10, press the Windows key, then search for and
First of all, please note that token expiration and revoking are two different things.
- Expiration only happens for web apps, not for native mobile apps, because native apps never expire.
- Revoking only happens when (1) uses click the logout button on the website or native Apps;(2) users reset their passwords; (3) users revoke their tokens explicitly in the administration panel.
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:
After checking multiple tutorials I had to take pieces from each of the following to get this to work on my Win10 system:
- https://www.howtogeek.com/165268/how-to-add-open-powershell-here-to-the-context-menu-in-windows/
- https://www.tenforums.com/tutorials/60175-open-powershell-window-here-context-menu-add-windows-10-a.html
Basically it uses the steps from the first article, but under the background
path from the second article.
Neither article on its own worked for me.
Steps:
#!/bin/sh | |
# | |
# This script outputs "stdout" to stdout and "stderr" to stderr. | |
# | |
# Try it like this and observe the differences: | |
# | |
# out-vs-err.sh 2>&1 >/dev/null | |
# out-vs-err.sh >/dev/null 2>&1 | |
# | |
# See <http://stackoverflow.com/questions/10508843/what-is-dev-null-21/10508862#comment48709328_10508843> |
# Xcode 4.3.3 | |
Apple clang version 3.1 (tags/Apple/clang-318.0.61) (based on LLVM 3.1svn) | |
Target: x86_64-apple-darwin11.4.0 | |
Thread model: posix | |
# Xcode 4.3.2 | |
Apple clang version 3.1 (tags/Apple/clang-318.0.58) (based on LLVM 3.1svn) | |
Target: x86_64-apple-darwin11.4.0 | |
Thread model: posix |
/* | |
* To compile objective-c on the command line: | |
* | |
* gcc -framework Foundation objc-gcc.m | |
* | |
* You may have to link with -lobjc or other libs, | |
* as required. | |
*/ | |
#import <Foundation/Foundation.h> |