Search By Label
gcloud auth login gcloud config set project YOUR_PROJECT_ID gcloud container clusters get-credentials YOUR_CLUSTER_NAME --zone YOUR_CLUSTER_ZONE
ollama pull llama3.2
ollama run llama3.2
kubectl get deployments
: List all the running deployments.kubectl describe deployment <deploy name>
: Print out details about a specific deploymentkubectl apply -f <config file name>
: Create a deployment out of a config file.kubectl delete deployment <deploy name>
: Delete a deploykubectl rollout restart deployment <deploy name>
: Restart all pods created by deployment.restartPolicy
is set to Never
or OnFailure
.SUM
and get decimals complementing with numeric
in the following way:select us.product_id, ROUND(SUM(us.units * p.price)::numeric / SUM(us.units), 2) AS average_price from Prices p left join UnitsSold us on us.product_id = p.product_id and us.purchase_date between p.start_date and p.end_date group by us.product_id order by us.product_id
export const displayRoute = (route: string, t: (key: string) => string): string => { const accountDetailRegex = /^\/accounts\/[0-9a-fA-F-]{36}$/;
if (accountDetailRegex.test(route)) return t('accountDetails'); };
customer_id
and name
product_id
and name
SELECT customers.customer_id, customers.name, products.product_id, products.name FROM customers CROSS JOIN products;
.replace()
to match everything from the start of your string up until the first dot .
, and replace that with an empty string.var str = "P001.M003.PO888393";
var res = str.replace(/^[^\.]*\./, '');
console.log(res);
#=> M003.PO888393
arr = new Array(3).fill(0)
docker push NAME[:TAG]
docker tag [OPTIONS] IMAGE[:TAG] [REGISTRYHOST/][USERNAME/]NAME[:TAG]
docker tag 518a41981a6a myRegistry.com/myImage
GET
request expresses the user's intent to not have any side effects. Naturally, there will always be side effects on the server like log entries for example, but the important distinction here is whether the user had asked for a side effect or not.GET
surfaces if you respond with the recommended 201 Created
response for a request where the resource is being created on the server. The next request would result in a different response with status 200 OK
and thus it cannot be cached as is usually the case with GET
requests.The PUT method requests that the enclosed entity be stored under the supplied Request-URI. If the Request-URI refers to an already existing resource, the enclosed entity SHOULD be considered as a modified version of the one residing on the origin server. If the Request-URI does not point to an existing resource, and that URI is capable of being defined as a new resource by the requesting user agent, the origin server can create the resource with that URI.
If a new resource is created, the origin server MUST inform the user agent via the 201 (Created) response. If an existing resource is modified, either the 200 (OK) or 204 (No Content) response codes SHOULD be sent to indicate successful completion of the request. If the resource could not be created or modified with the Request-URI, an appropriate error response SHOULD be given that reflects the nature of the problem.
409 Conflict
in case an update would result in a different state.then
or catch
.// Add a request interceptor axios.interceptors.request.use(function (config) { // Do something before request is sent return config; }, function (error) { // Do something with request error return Promise.reject(error); }); // Add a response interceptor axios.interceptors.response.use(function (response) { // Any status code that lie within the range of 2xx cause this function to trigger // Do something with response data return response; }, function (error) { // Any status codes that falls outside the range of 2xx cause this function to trigger // Do something with response error return Promise.reject(error); });