Add the following snippet at the bottom of ~/.zshrc
file.
RPROMPT='[%D{%L:%M:%S}] '$RPROMPT
#!/bin/bash | |
# This script is for Mac OSX users. If you are on Linux, replace 'gxargs' with 'xargs'. | |
# To install 'gxargs' command using Homebrew, run 'brew install findutils' first. | |
# Without parallel (ideal for small number of pods) | |
kubectl get pods --all-namespaces | grep Evicted | awk '{print $2 " --namespace=" $1}' | gxargs -n 1 -d '\n' bash -c 'kubectl delete pod $0 $1 --force --wait=false' | |
# With parallel (ideal for big number of pods) | |
# To install 'parallel' command using Homebrew, run 'brew install parallel' first. |
select * from movies; | |
-- create table + insert data + drop delete table | |
create table emp( | |
id int primary key auto_increment, | |
depid int default 1, | |
salary float default 0, | |
name varchar(5) not null | |
); | |
insert into emp(depid, salary, name) |
public class AutoSuggestion { | |
private static final int TEN_THOUSAND_REQUESTS = 10000; | |
private static final int START = 0; | |
private static final String SEPARATOR = "--------------------------------------------------------------------" + | |
"---------------------------------------------------------------"; | |
public static void main(String[] args) { | |
/* |
/* Deleting a node from Binary search tree */ | |
#include<iostream> | |
using namespace std; | |
struct Node { | |
int data; | |
struct Node *left; | |
struct Node *right; | |
}; | |
//Function to find minimum in a tree. | |
Node* FindMin(Node* root) |