next.js, nginx, reverse-proxy, ssl
$ sudo apt-get update
$ sudo apt-get install nginx letsencrypt
import {execSync} from 'child_process'; | |
function main() { | |
const stdout = execSync( | |
"kubectl get deployment --all-namespaces --selector=projectCustomer=yes | awk '{print $1,$2}' | tail -n +2", | |
); | |
const results = stdout | |
.toString() | |
.split(/\n/) |
[ | |
{ | |
"code": 100, | |
"name": "Continue", | |
"enum": "CONTINUE", | |
"reference": { | |
"info": "RFC 7231, Section 6.2.1", | |
"url": "https://tools.ietf.org/html/rfc7231#section-6.2.1" | |
}, | |
"description": "The server has received the request headers and the client should proceed to send the request body", |
namespace Domain { | |
export class Hero { | |
private constructor(private _name: string) { } | |
get name(): string { return this._name; } | |
static create(name: string): [Hero, Error] { | |
if (!name || name.trim().length < 3 || name.trim().length > 100) { | |
return [null, new InvalidNameError(name)] | |
} |
// Value object | |
class CityName { | |
static readonly MIN_LEN_NAME: number = 3 | |
static readonly MAX_LEN_NAME: number = 100 | |
private constructor(private _name: string) { } | |
// Factory method with validation rules | |
static create(name: string): [CityName, Error] { |
/** | |
* # Assigning properties to an object type in TypeScript | |
* | |
* When we want to assign some properties on a object type | |
* we usually use the `&` operator: | |
* | |
* type B = A & { someProperty: string } | |
* | |
* It seems to work at first sight, but it doesn't behave exactly | |
* as we would expect when we try to override properties that already |
/** | |
* # How does `A extends B` work in TypeScript? | |
* | |
* If you think about types in terms of sets containing possible values, | |
* the `string` type is the set of all possible strings, | |
* the `number` type is the set of all possible numbers, | |
* the `'hello'` type is a set containing only the string 'hello' | |
* and the `2` type is a set containing only the number 2. | |
* | |
* Then you can think of `A extends B` as asking this question: |
I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.
I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't really have SREs and they make engineers pretty much do everything,
Download and run the Adobe Creative Cloud Cleaner Tool, their multi-app uninstaller and wipe assistant. Adobe does recommend running individual application uninstallers first, your call. Click the Clean All option.
Type a one line command in terminal find ~/ -iname "*adobe*"
and it's shows up all files which match pattern.
To remove all files
`sudo rm -rf /Applications/Adobe* /Applications/Utilities/Adobe* /Library/Application\ Support/Adobe /Library/Preferences/com.adobe.* /Library/PrivilegedHelperTools/com.adobe.* /private/var/db/receipts/com.adobe.* ~/Library/Application\ Support/Adobe* ~/Library/Application\ Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/com.adobe* ~/Library/Application\ Support/CrashReporter/Adobe* ~/Library/Caches/Adobe ~/Library/Caches/com.Adobe.* ~/Library/Caches/com.adobe.* ~/Library/Cookies/com.adobe.* ~/Library/Logs/Adobe* ~/Librar
// Create "backend" object to hold data for getters and setters on main object | |
const _ = Object.create( null ); | |
Object.defineProperties( | |
_, | |
{ | |
firstname: { | |
value: 'John', | |
writable: true, | |
enumerable: false, |