Skip to content

Instantly share code, notes, and snippets.

View razvan-moldovan's full-sized avatar
💭
Code with joy

Răzvan Moldovan razvan-moldovan

💭
Code with joy
  • România
View GitHub Profile
@razvan-moldovan
razvan-moldovan / backupdatabases.sh
Created February 23, 2019 10:58
Import/Export local databases
#!/bin/bash
USER="root"
PASSWORD=""
OUTPUT="./databases"
rm ./databases/*.gz > /dev/null 2>&1
rm ./databases/*.sql > /dev/null 2>&1
@razvan-moldovan
razvan-moldovan / git-snippets.md
Last active July 31, 2018 11:12
Usefull git commands

Delete multiple local tags

git tag -d `git tag -l '1.6.1-*'`

Delete multiple remote tags

git push --delete <remote> `git ls-remote --tags <remote> | awk '{print $2}' | grep -v '{}' | awk -F"/" '{print $3}' | grep -E '1.6.0-rc*'`

Push multiple branches

Keybase proof

I hereby claim:

  • I am razvan-moldovan on github.
  • I am razvanmoldovan (https://keybase.io/razvanmoldovan) on keybase.
  • I have a public key ASBKrBgEBcXLYiO-fypGaUXIEUcEqgjlttyMTnzWWOejUAo

To claim this, I am signing this object:

/**
* Search Mysql tables that contain particular fields
*
*/
SELECT DISTINCT TABLE_NAME
FROM INFORMATION_SCHEMA.COLUMNS
WHERE COLUMN_NAME IN ('field', 'field2)
AND TABLE_SCHEMA='db_name';
@razvan-moldovan
razvan-moldovan / OOCSS.html
Last active January 6, 2016 12:41
OOCSS example
<h1>OOCSS</h1>
<div class="media attribution">
<a href="http://twitter.com/stubbornella" class="img">
<img src="http://stubbornella.com/profile_image.jpg" alt="me" />
</a>
<div class="bd">
@Stubbornella 14 minutes ago