Last updated: August 2025
- We collect your GPS location to provide location-based services
- Location data is used only for app functionality and is not shared with third parties
This is a secret gist to host images |
#!/bin/bash | |
echo -e "\n**Current SSH Connections:**\n" | |
echo -e "IP Address\t\tAuth Method\t\tCountry" | |
# Get all active SSH connection IPs | |
netstat -napt | grep "ESTABLISHED.*ssh" | awk '{print $5}' | cut -d':' -f1 | sort -u | while read -r ip; do | |
# Check if the IP used a password | |
if sudo grep -E "Accepted password|Accepted publickey|Accepted keyboard-interactive|Accepted gssapi" /var/log/auth.log* | grep -q "$ip"; then | |
auth_method=$(sudo grep -E "Accepted password|Accepted publickey|Accepted keyboard-interactive|Accepted gssapi" /var/log/auth.log | grep "$ip" | awk '{print $9}') |
Users
billa_telegram_bot> db.metadata.aggregate([ { $group: { _id: "$user_name", count: { $sum: 1 }, first_timestamp: { $first: "$timestamp" }, last_timestamp: { $last: "$timestamp" }} }] )
[
{
_id: 'sharda shinde',
count: 161,
first_timestamp: ISODate('2025-01-24T05:22:56.219Z'),
last_timestamp: ISODate('2025-01-28T04:27:32.570Z')
},
{ | |
"siteId": { | |
"description": "The station identifier for the replantation site", | |
"type": "enum", | |
"values": ["station1", "station2", "station3", "station4", "station5"] | |
}, | |
"studyId": { | |
"description": "An identifier for the study", | |
"type": "string" | |
}, |
MongoDB is document database that supports range and field queries.
A single server can run either standalone or as part of a replica set. A "replica set" is set of mongod instances with 1 primary. Primary: receives writes, services reads. Can step down and become secondary. Secondary: replicate the primary's oplog. If the primary goes down, secondaries will hold an election. Arbiter: used to achieve majority vote with even members, do not hold data, don't need dedicated nodes. Never becomes primary.
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: echoheaders-lb | |
annotations: | |
service.alpha.kubernetes.io/only-node-local-endpoints: "true" | |
labels: | |
app: echoheaders-lb | |
spec: | |
type: LoadBalancer |
First make your service type=NodePort
Then create an instance group in UI (console.cloud.google.com), with some pool of instances from one of your zones:
gcloud compute --project $PROJECT instance-groups create unmanaged $K8S_IG
gcloud compute --project $PROJECTinstance-groups unmanaged add-instances $K8S_IG --instances $NODE,$NODE_1...
Add the Service NodePort to the InstanceGroup:
gcloud compute --project $PROJECT instance-groups set-named-ports $K8S_G --named-ports svc1:$SVC1_NODE_PORT
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: echoheaders | |
labels: | |
app: echoheaders | |
spec: | |
type: NodePort | |
ports: | |
- port: 80 |
echo HAHAHA |