Skip to content

Instantly share code, notes, and snippets.

View ShockwaveNN's full-sized avatar

Pavel Lobashov ShockwaveNN

View GitHub Profile
@ShockwaveNN
ShockwaveNN / BatchResizeWatermark.bat
Created November 24, 2013 11:17
Для работы требуется Imagick 1. Конвертирует в png 2. Меняет размер на 1200*800 учитывая соотношения сторон 3. Добавляет ватермарку "vk.com/club48760252"
MKDIR %1\converted
for %%f in (%1\*.jpg) do ( convert "%%f" -gravity southeast -stroke "#000C" -pointsize 24 -resize 1200x800 -strokewidth 2 -annotate 0 "vk.com/club48760252" -stroke none -fill white -annotate 0 "vk.com/club48760252" "%1\converted\%%~nf.png" )
@ShockwaveNN
ShockwaveNN / feedly_export_saved_for_later
Last active June 21, 2020 21:25 — forked from bradcrawford/feedly_export_saved_for_later
Working script for latest feedly redising. Drop support of `time` field, no longer avaible (or I din't found it)
// Simple script that exports a users "Saved For Later" list out of Feedly
// as a JSON string.
//
// This was intended for use in the Google Chrome's "Inspector" tool so your
// mileage may vary if used in other contexts.
//
// Format of JSON is as follows:
// [
// {
// title: "Title",
@ShockwaveNN
ShockwaveNN / aliases
Last active June 19, 2020 06:52
aliases
git config --global alias.ammend 'commit -av --amend --no-edit'
git config --global alias.call 'commit -av'
git config --global alias.pprune 'pull --prune'
echo 'alias rubocop_update="git pull --prune && bundle install && rubocop --auto-gen-config && git diff && git checkout -f"' >> ~/.bashrc
echo 'alias master_update="git checkout master && git pull --prune"' >> ~/.bashrc
echo 'alias system_update="sudo apt -y update && sudo apt dist-upgrade && sudo snap refresh && flatpak update"' >> ~/.bashrc
@ShockwaveNN
ShockwaveNN / Dockerfile
Last active October 18, 2017 16:42
Onlyoffice Documentserver Debian-based Dockerfile
FROM debian:latest
RUN apt-get update && apt-get -y install curl sudo
RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe multiverse" | tee -a /etc/apt/sources.list
RUN curl -sL https://deb.nodesource.com/setup_6.x | bash -
RUN apt-get -y install postgresql redis-server rabbitmq-server
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys CB2DE8E5
RUN echo "deb http://download.onlyoffice.com/repo/debian squeeze main" | tee /etc/apt/sources.list.d/onlyoffice.list
RUN apt-get update
RUN service postgresql start && \
sudo -u postgres psql -c "CREATE DATABASE onlyoffice;" && \
@ShockwaveNN
ShockwaveNN / Dockerfile
Created April 5, 2017 07:55
god on centos
FROM centos:latest
RUN yum install -y gcc \
make \
ruby \
ruby-devel
RUN gem install god
CMD god -v
@ShockwaveNN
ShockwaveNN / bugzillaTemplate
Created May 24, 2017 13:37
bugzilla template bug/create/create.html.tmpl
[% comment FILTER none %]
Сценарий:
----------------------
1.
2.
3.
Ожидаемый результат:
----------------------
emerge dev-vcs/git \
app-arch/p7zip \
dev-qt/qt-meta
eselect python set 2
git clone --recursive https://github.com/ONLYOFFICE/DocumentServer.git
cd DocumentServer/core/Common/3dParty && ./make.sh
@ShockwaveNN
ShockwaveNN / web-apps-update-sh
Last active July 31, 2017 14:19
update web apps to custom branch
apt-get update && apt-get -y install git
git clone -b feature/new-toolbar https://github.com/ONLYOFFICE/web-apps.git
cd web-apps/build/
npm install -g grunt-cli
npm install
SERVER_VERSION=$(dpkg-query --showformat='${Version}' --show onlyoffice-documentserver-integration)
PRODUCT_VERSION=4.5.dev BUILD_NUMBER="${SERVER_VERSION#*-}" grunt --level=ADVANCED
cp -r /web-apps/deploy/web-apps/ /var/www/onlyoffice/documentserver/
{ Error: ENOENT: no such file or directory, stat '/var/www/onlyoffice/documentserver-example/public/files/85.198.95.234/new (1).pptx'
at Error (native)
at Object.fs.statSync (fs.js:1001:11)
at Object.docManager.getKey (/var/www/onlyoffice/documentserver-example/helpers/docManager.js:304:29)
at /var/www/onlyoffice/documentserver-example/app.js:520:30
at Layer.handle [as handle_request] (/var/www/onlyoffice/documentserve
Nov 9 11:17:00 wrata-staging kernel: [4418400.260149] INFO: task log_manager.rb*:19252 blocked for more than 120 seconds.
Nov 9 11:17:00 wrata-staging kernel: [4418400.262956] Not tainted 4.4.0-96-generic #119-Ubuntu
Nov 9 11:17:00 wrata-staging kernel: [4418400.264819] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
Nov 9 11:17:00 wrata-staging kernel: [4418400.267621] log_manager.rb* D ffff880006f63b38 0 19252 19100 0x00000100
Nov 9 11:17:00 wrata-staging kernel: [4418400.267632] ffff880006f63b38 ffff880004a86200 ffff88000266b800 ffff8800121d5400
Nov 9 11:17:00 wrata-staging kernel: [4418400.267637] ffff880006f64000 ffff880006f63c90 ffff880006f63c88 ffff8800121d5400
Nov 9 11:17:00 wrata-staging kernel: [4418400.267641] ffff8800121d5400 ffff880006f63b50 ffffffff8183f165 7fffffffffffffff
Nov 9 11:17:00 wrata-staging kernel: [4418400.267646] Call Trace:
Nov 9 11:17:00 wrata-staging kernel: [4418400.267664] [<ffffffff8183f165>] schedule+0x35/0x80
Nov 9 11:17:00