$ uname -r
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 } { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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' |
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\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) |