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 / clean-up-boot-partition-ubuntu.md
Created November 11, 2019 09:49 — forked from ipbastola/clean-up-boot-partition-ubuntu.md
Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Reference

Case I: if /boot is not 100% full and apt is working

1. Check the current kernel version

$ uname -r 
@ibqn
ibqn / action.ts
Created November 9, 2019 09:05 — forked from JLarky/action.ts
type safe redux actions (typescript)
// like typesafe-actions
export type AnyAction<T extends string, A> = A & {
type: T;
};
export function createAction<T extends string, P, AC extends (...args: any[]) => AnyAction<T, P>>(
type: T,
map: AC
): AC & { type: T } {
// 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'
@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
@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 / pip.txt
Last active March 12, 2020 10:14
pip freeze | grep -v "pkg-resources" | sort > frozed-requirements.txt
truncate -s 0 hashed-requirements.txt
while read p
do
echo "$p"
hashin "$p" --requirements-file=hashed-requirements.txt
done < frozed-requirements.txt

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 / 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)
@ibqn
ibqn / notes.md
Last active November 3, 2019 20:12
Useful notes

disable dynamic session-creation by default in byubu

Allow the dynamic session-creation behaviour to be disabled by creating

 touch ~/.byobu/.reuse-session

Its fixed in byobu 5.125. Just create ~/.byobu/.reuse-session