Skip to content

Instantly share code, notes, and snippets.

View woopstar's full-sized avatar

Andreas Krüger woopstar

View GitHub Profile
@SpaceK33z
SpaceK33z / macos-to-windows.md
Last active March 8, 2023 16:11
macOS to Windows Project [WIP]

Package manager

Chocolatey seems to be the king. Make sure to install this first since you can install almost all apps below with it!

File exploring

Seer is a good Spotlight alternative.

I need to find a quick way to access the downloads/screenshots folder like on macOS from the dock, preferably without opening the Explorer.

Best unzip/extract tool? I guess 7zip?

@glogiotatidis
glogiotatidis / remove-gpg-user.sh
Created May 24, 2016 11:50
Git-crypt remove user.
#!/bin/bash
#
# Script to remove GPG key from git-crypt
#
# It will re-initialize git-crypt for the repository and re-add all keys except
# the one requested for removal.
#
# Note: You still need to change all your secrets to fully protect yourself.
# Removing a user will prevent them from reading future changes but they will
# still have a copy of the data up to the point of their removal.
@tafkey
tafkey / git_overview
Last active October 19, 2023 15:15
Print git status of all repositories under the current folder
find . -type d -name '.git' | while read dir ; do sh -c "cd $dir/../ && echo -e \"\nGIT STATUS IN ${dir//\.git/}\" && git status -s" ; done
@z0mbix
z0mbix / tcpdump-es-capture
Created December 19, 2014 14:45
Capture Elasticsearch Queries
# tcpdump -A -nn -s 0 'tcp dst port 9200 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)' -i lo
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on lo, link-type EN10MB (Ethernet), capture size 65535 bytes
14:32:33.525122 IP 127.0.0.1.49777 > 127.0.0.1.9200: Flags [P.], seq 313752908:313753888, ack 2465010394, win 257, options [nop,nop,TS val 2684167067 ecr 2684167066], length 980
E...^.@.@............q#...}L...............
..#...#.GET /index/_search HTTP/1.1
Host: 127.0.0.1:9200
Accept: */*
Content-Length: 845
Content-Type: application/x-www-form-urlencoded
@sguillope
sguillope / bamboo_delete_disabled_branches.sh
Last active January 1, 2023 15:28
Script to delete all disabled branches of a Bamboo build plan.
#!/bin/bash -u
# Deletes all disabled branches of a Bamboo build plan
# -----------------------------------------------------------------------------
# Syntax:
# $0 {planKey}
# -----------------------------------------------------------------------------
# Purpose: Bamboo does not automatically delete plan branches when the
# corresponding branch in the repository gets deleted. Because Bamboo fails
# to pull from it, it disables the branch but keep it around forever.
# This script goes through all branches of a build plan and delete the ones
@conorbranagan
conorbranagan / gist:4513828
Last active May 18, 2024 21:28
Linux System Metrics

Linux System Metrics

CPU

  • system.cpu.idle: % Idle CPU
  • system.cpu.system: % System CPU
  • system.cpu.user: % User CPU

Disk

@dalecaru
dalecaru / innobackupex-restore.sh
Created April 20, 2011 13:42
Scripts to create and restore full and incremental backups (for all databases on server) using innobackupex from Percona.
#!/bin/sh
#
# Script to prepare and restore full and incremental backups created with innobackupex-runner.
#
# This script is provided as-is; no liability can be accepted for use.
#
INNOBACKUPEX=innobackupex-1.5.1
INNOBACKUPEXFULL=/usr/bin/$INNOBACKUPEX
TMPFILE="/tmp/innobackupex-restore.$$.tmp"
@chetan
chetan / gist:333147
Created March 15, 2010 18:29
lua script for mysql workbench to clear charset and collation
function clearCharSetAndCollation()
local schemata = grtV.getGlobal("/wb/doc/physicalModels/0/catalog/schemata")
local s
local tables
local t
for s=1, grtV.getn(schemata) do
print(schemata[s].name .. "\n")