apt install php7.2-mysql php7.2-dom php7.2-curl
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
php wp-cli.phar --info
chmod +x wp-cli.phar
sudo mv wp-cli.phar /usr/local/bin/wp
wp --info
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { NextResponse } from 'next/server' | |
import type { NextRequest } from 'next/server' | |
import { verifyToken } from '@clerk/backend' | |
interface JwtPayload { | |
exp: number; | |
fva?: [number, number] | undefined; | |
iat: number; | |
iss: string; | |
nbf: number; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const TypeColor = [ | |
'low', | |
'info', | |
'high', | |
'critical', | |
undefined, | |
] as const; | |
export type TypeColor = (typeof TypeColor)[number]; | |
// Guard value |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type BatchFunc func(start, end int) error | |
const ( | |
MaxBulkDelete = 1000 | |
MaxBatchSize = 25 | |
) | |
func (s service) BulkDelete(ctx context.Context, businessMetrics []*vanalytics_v1.DeleteBusinessMetricRequest) (*vanalytics_v1.DeleteMultiBusinessMetricsResponse, error) { | |
response := &vanalytics_v1.DeleteMultiBusinessMetricsResponse{} |
I had a machine crash, and needed to setup another one with SSH access. I got the console login ok, but no way to paste my public key there. Just spent a whole day trying to find a way to do this.
My solution, finally was to put the public key on a public dropbox folder, then in the console, use:
curl 'https://dl.dropbox.....' > temp1
cat temp1 >> .ssh/authorized_keys
- Python 3.7+
- VirtualEnv
- Poetry (https://poetry.eustace.io/) // Package and dependency manager
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
image: google/cloud-sdk:latest | |
stages: | |
- deploy | |
#################################################################################################### | |
# DEPLOY | |
# | |
.deploy_template: &deploy_template_def | |
stage: deploy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// { | |
// "id": 4, | |
// "name": "Nikola Tesla", | |
// "branch": "0001", | |
// "branchVerificationDigit": "string", | |
// "account": "1256720", | |
// "accountVerificationDigit": 3, | |
// "phone": "11 95555-5555", | |
// "email": "nikola@tesla.com", | |
// "apiMetadata": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Copyright 2015 Google Inc. All Rights Reserved. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user nginx; | |
# PERFORMANCE | |
# https://gist.github.com/denji/8359866 | |
# you must set worker processes based on your CPU cores, nginx does not benefit from setting more than that | |
worker_processes auto; #some last versions calculate it automatically | |
# number of file descriptors used for nginx | |
# the limit for the maximum FDs on the server is usually set by the OS. | |
# if you don't set FD's then OS settings will be used which is by default 2000 | |
worker_rlimit_nofile 100000; |
NewerOlder