Skip to content

Instantly share code, notes, and snippets.

View artembeloglazov's full-sized avatar
🚴

Artem Beloglazov artembeloglazov

🚴
View GitHub Profile
@artembeloglazov
artembeloglazov / main.js
Last active September 23, 2015 15:37
Динамическая подгрузка js-скрипта с учетом обхода ограничения по mime-типу(http://stackoverflow.com/questions/24528211/refused-to-execute-script-from-because-its-mime-type-application-json-is)
$.getScript("URL", function(){});
@artembeloglazov
artembeloglazov / readme.md
Last active September 22, 2015 12:12
Обновление интерфейса git-репозиториев в redmine

Установка

chmod a+x $HOME/redmine_git_cron/redmine_git_cron.sh
crontab -e
* * * * * $HOME/redmine_git_cron/redmine_git_cron.sh > /dev/null 2>&1
@artembeloglazov
artembeloglazov / index.html
Created September 14, 2015 15:25
Решение при ошибке 404 при запросе браузером favicon.ico
<link rel="shortcut icon" href="data:image/x-icon;," type="image/x-icon">
export XDEBUG_CONFIG="idekey=ECLIPSE_DBGP"
# в конфиге php для xdebug обязательно нужно указать параметр xdebug.remote_host
@artembeloglazov
artembeloglazov / 0_reuse_code.js
Last active September 1, 2015 08:34
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@artembeloglazov
artembeloglazov / gist:627499dcc5ecd5e160c8
Created August 20, 2015 08:41
Init-скрипт для nginx /etc/init.d/nginx
#! /bin/sh
### BEGIN INIT INFO
# Provides: foobar
# Required-Start: $local_fs $network
# Required-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: foobar
# Description: more foo for your bars
@artembeloglazov
artembeloglazov / miniserv.conf
Created August 20, 2015 08:29
Установка адреса(listen) для webmin'a
host=luka.rg1.ru
@artembeloglazov
artembeloglazov / gist:6ffdd882b427359b062f
Last active August 29, 2015 14:27
Рекурсивный git status
find . -name '.git' -type d | while read dir ; do sh -c "cd $dir/../ && echo '\n\n$dir:\n\n' && git status" ; done
@artembeloglazov
artembeloglazov / file.php
Created August 3, 2015 15:02
Удаление всех пробельных символов из строки
preg_replace('/\s+/', '', $string)
@artembeloglazov
artembeloglazov / gist:1edc82fe57325986ccc1
Created July 28, 2015 07:21
Конвертация файлов из CP1251 в UTF-8
find . -type f -name '*.php' -print -exec iconv -f euc-kr -t utf-8 {} -o {}.utf8 \;