Skip to content

Instantly share code, notes, and snippets.

View flipace's full-sized avatar
🙈
Peek-a-boo

Patrick Hübl-Neschkudla flipace

🙈
Peek-a-boo
  • ovos media gmbh
  • vienna
  • 06:24 (UTC +02:00)
View GitHub Profile
@flipace
flipace / keybase.md
Created July 17, 2018 14:02
keybase.md

Keybase proof

I hereby claim:

  • I am flipace on github.
  • I am flipace (https://keybase.io/flipace) on keybase.
  • I have a public key ASAWzpWUBpQsE500qVOf0nxtg111lp7FY7r8qAHWRXZcVwo

To claim this, I am signing this object:

@flipace
flipace / delete git tags
Created February 16, 2019 10:47
Delete lot's of git tags easily
git tag --list 'v*' | xargs -I % echo "git tag -d %; git push --delete origin %" | sh
@flipace
flipace / mysql-cross-db-command.md
Last active February 27, 2019 15:36
MySQL Cross-Database Commands

Generate UNION ALL queries for e.g create view

SELECT CONCAT('SELECT `type` COLLATE utf8mb4_unicode_ci as type, "', schema_name, '" COLLATE utf8mb4_unicode_ci as tenant FROM `', 
    schema_name, '`.`micro_sessions` UNION ALL')
FROM information_schema.schemata
WHERE schema_name NOT IN ('information_schema','mysql','performance_schema');

Convert everything to different Charset + Collation

@flipace
flipace / checkremote.sh
Created November 25, 2019 09:11
Check all git remotes
#!/bin/bash
checkremote() {
dir=$(pwd)
echo "Looking for git folders in ${dir} and below. Ignoring node_modules."
results=$(find $dir -not -path "*node_modules*" -not -path ".git/*" -name .git -type d);
for f in $results; do
(cd $f/..; echo ""; echo "$f:"; git remote -v;)