Skip to content

Instantly share code, notes, and snippets.

View skazhikadyadya's full-sized avatar
💭
For The Glory Of Satan!

skazhikadyadya

💭
For The Glory Of Satan!
View GitHub Profile
#!/bin/sh
mkdir -p ~/.vim/syntax/
cd ~/.vim/syntax/
wget http://www.vim.org/scripts/download_script.php?src_id=19394
mv download_script.php\?src_id\=19394 nginx.vim
cat > ~/.vim/filetype.vim <<EOF
au BufRead,BufNewFile /etc/nginx/*,/usr/local/nginx/conf/* if &ft == '' | setfiletype nginx | endif
EOF
@skazhikadyadya
skazhikadyadya / EE-TO-CE_Downgrade
Last active March 22, 2020 16:05 — forked from ProxiBlue/EE-TO-CE_Downgrade
Downgrade script for magento EE to CE #magento
#!/bin/bash
#first param = db user, second param = db name
rm -rf app/code/core/Enterprise
rm -rf downloader/template/enterprise
rm -rf app/design/install/default/enterprise
rm -rf app/design/frontend/enterprise
rm -rf app/design/adminhtml/default/default/layout/enterprise
rm -rf app/design/adminhtml/default/default/template/enterprise
@skazhikadyadya
skazhikadyadya / gist:5c78f8cfffab22aa08a1b8c1146af1f6
Last active March 22, 2020 16:06
Random strings from DB #mysql
SELECT * FROM table AS r1
JOIN (SELECT (RAND()*(SELECT MAX(id)-MIN(id) FROM table) +
(SELECT MIN(id) FROM table)) AS id) AS r2
WHERE r1.id >= r2.id ORDER BY r1.id ASC LIMIT 300