Skip to content

Instantly share code, notes, and snippets.

@grimzy
grimzy / git-pull-all
Created September 15, 2017 02:15
Git pull all remote branches
#!/usr/bin/env bash
git branch -r | grep -v '\->' | while read remote; do git branch --track "${remote#origin/}" "$remote"; done
git fetch --all
git pull --all
#!/bin/bash
CLUSTERS=$(gcloud container clusters list \
--format 'value(name)[terminator=" "]')
NODE_PORT=32080
gcloud compute health-checks create tcp hello-kubernetes-health-check --port ${NODE_PORT}
gcloud compute backend-services create hello-kubernetes-backend-services \
--connection-draining-timeout 3600 \
@halberom
halberom / 00_play.yml
Last active December 11, 2021 05:08
ansible - convoluted json_query foo - reducing a nested dict to just bits we can use
---
- hosts: localhost
connection: local
gather_facts: False
tasks:
# - include_vars: jsonfile.json
#
# - debug:
# var: ansible_devices
#

#petya #petrWrap #notPetya

Win32/Diskcoder.Petya.C

Ransomware attack.

About

This gist was built by the community of the researchers and was scribed by Kir and Igor from the QIWI/Vulners. We are grateful for the help of all those who sent us the data, links and information. Together we can make this world a better place!

Gist updates

gcloud compute instance-groups unmanaged create taiwan \
--zone asia-east1-a
gcloud compute instance-groups unmanaged add-instances taiwan \
--instances $(kubectl get nodes \
--context taiwan \
--output=jsonpath='{range .items[*]}{.metadata.name},{end}') \
--zone asia-east1-a
gcloud compute instance-groups set-named-ports taiwan \
@bzub
bzub / kube-router-cfg.yaml
Last active January 19, 2022 20:52
kubeadm kube-router troubleshooting
apiVersion: v1
kind: ConfigMap
metadata:
name: kube-router-cfg
namespace: kube-system
labels:
tier: node
k8s-app: kube-router
data:
cni-conf.json: |
kubectl get pods | grep Evicted | awk '{print $1}' | xargs kubectl delete pod
@igreenfield
igreenfield / Capture_HTTP_traffic.sh
Created June 8, 2017 07:44
Capture HTTP traffic: tcpdump
#!/bin/bash
##########################################
# Generate Filter tool:
# https://www.wireshark.org/tools/string-cf.html
#
# GET Filter:
# tcp[((tcp[12:1] & 0xf0) >> 2):4] = 0x47455420
# POST Filter:
# tcp[((tcp[12:1] & 0xf0) >> 2):4] = 0x504f5354 && tcp[((tcp[12:1] & 0xf0) >> 2) + 4:1] = 0x20
global:
scrape_interval: 60s
external_labels:
monitor: 'example'
rule_files:
- /etc/prometheus/config/*.rules
scrape_configs: