Skip to content

Instantly share code, notes, and snippets.

View ibqn's full-sized avatar

Evgeny Bobkin ibqn

  • Europace AG
  • Berlin - Deutschland
View GitHub Profile
@ibqn
ibqn / build-rspamd.md
Last active July 13, 2019 08:22
Create a deb package for rspamd on armhf (Raspberry Pi)

Install build and runtime dependencies:

git clone --recursive https://github.com/vstakhov/rspamd.git
cd rspamd

For master:

sudo apt install devscripts fakeroot debhelper libcurl4-openssl-dev dh-systemd libjemalloc-dev libunwind-dev ragel libevent-dev lua5.1 liblua5.1-dev cmake sqlite3 libmagic-dev libsqlite3-dev libicu-dev libglib2.0-dev libssl-dev libsodium-dev
@ibqn
ibqn / rainloop.md
Last active July 14, 2019 14:10
Install RainLoop Webmail on Ubuntu 18.04 or Raspbian

Install RainLoop Webmail

Download the latest RainLoop Webmail community version

wget http://www.rainloop.net/repository/webmail/rainloop-community-latest.zip

Create a new directory for our RainLoop webmail installation

sudo mkdir -p /var/www/rainloop

Extract the files from the archive and upload them to the RainLoop web root directory

@ibqn
ibqn / block-china.md
Created July 14, 2019 19:33
Fear China. Unexpected ddos on your sshd deamon blocking china with ipset and iptables

Install ipset

sudo apt install ipset

Create folder

sudo mkdir -p /etc/block-china/

Create a bash script

@ibqn
ibqn / docker.md
Last active July 21, 2019 18:13
Install Docker on Ubuntu, Debian and Raspbian (Raspberry Pi 3), respectively

Install docker

prerequisites, install them if not already present

sudo apt install apt-transport-https  ca-certificates curl gnupg-agent software-properties-common

add docker's GPG key

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
@ibqn
ibqn / absender.lco
Created August 7, 2019 18:19 — forked from puppe/absender.lco
Deutsche Briefvorlage für LaTeX (scrlttr2)
\ProvidesFile{absender.lco}
\KOMAoptions{%
% fromemail=true, % Email wird im Briefkopf angezeigt
% fromphone=true, % Telefonnumer wird im Briefkopf angezeigt
% fromfax=true, % Faxnummer wird im Briefkopf angezeit
% fromurl=true, % URL wird im Briefkopf angezeigt
% fromlogo=true, % Logo wird im Briefkopf angezeigt
% subject=titled, % Druckt "Betrifft: " vor dem Betreff
locfield=wide, % Breite Absenderergänzung (location)
@ibqn
ibqn / absender.lco
Created August 7, 2019 18:19 — forked from puppe/absender.lco
Deutsche Briefvorlage für LaTeX (scrlttr2)
\ProvidesFile{absender.lco}
\KOMAoptions{%
% fromemail=true, % Email wird im Briefkopf angezeigt
% fromphone=true, % Telefonnumer wird im Briefkopf angezeigt
% fromfax=true, % Faxnummer wird im Briefkopf angezeit
% fromurl=true, % URL wird im Briefkopf angezeigt
% fromlogo=true, % Logo wird im Briefkopf angezeigt
% subject=titled, % Druckt "Betrifft: " vor dem Betreff
locfield=wide, % Breite Absenderergänzung (location)

pip freeze | grep -v "pkg-resources" | sort > freezed-requirements.txt

truncate -s 0 hashed-reqs.txt

while read p do echo "$p" hashin "$p" --requirements-file=hashed-reqs.txt done < freezed-requirements.txt

@ibqn
ibqn / postman_install.sh
Last active October 3, 2019 15:08 — forked from cagcak/postman_install.sh
Postman install Ubuntu 18.04
#!/usr/bin/env bash
# Get postman app
wget https://dl.pstmn.io/download/latest/linux64 -O postman.tar.gz
sudo tar -xzf postman.tar.gz -C /opt
sudo ln -s /opt/Postman/Postman /usr/bin/postman
# Create a Desktop Entry
cat > ~/.local/share/applications/postman.desktop <<EOL
[Desktop Entry]
@ibqn
ibqn / modify-pdf.md
Created October 13, 2019 08:32
Modify text in pdf files

Use pdftk to uncompress the file, then edit via sed and finally recompress it.

pdftk input.pdf output uncompressed.pdf uncompress
sed -i 's/foo/bar/g' uncompressed.pdf
# uncompressed.pdf now has all the changes
pdftk uncompressed.pdf output changed.pdf compress
// npm install --save scrollreveal or install like you're used to doing it.
// It doesn't work well if there are multiple instances of ScrollReveal,
// so we have to create a module returning an instance:
// file ScrollReveal.js:
import ScrollReveal from 'scrollreveal'
export default ScrollReveal()
// Then in a component:
import React from 'react'
import sr from './ScrollReveal'