Skip to content

Instantly share code, notes, and snippets.

View PatrikBrosell's full-sized avatar

Patrik Brosell PatrikBrosell

View GitHub Profile
### Keybase proof
I hereby claim:
* I am patrikbrosell on github.
* I am patrikbrosell (https://keybase.io/patrikbrosell) on keybase.
* I have a public key ASC6yWttcaRjMTjdWXhV3JpBEc35PHNPROp32yn1OW0_6go
To claim this, I am signing this object:
@PatrikBrosell
PatrikBrosell / make_favicon.sh
Created June 6, 2017 23:52 — forked from nateware/make_favicon.sh
Imagemagick to create favicon.ico with 16x16 and 32x32 sizes in it
# IE is still braindead so still use favicon.ico
convert -resize x16 -gravity center -crop 16x16+0+0 -flatten -colors 256 input.png output-16x16.ico
convert -resize x32 -gravity center -crop 32x32+0+0 -flatten -colors 256 input.png output-32x32.ico
convert output-16x16.ico output-32x32.ico favicon.ico
# Then, HTML needs to specify size="XxY" as largest size due to browser bugs
<link rel="shortcut icon" href="/favicon.ico" sizes="32x32">
@PatrikBrosell
PatrikBrosell / preprocessor_fun.h
Created May 27, 2017 13:41 — forked from aras-p/preprocessor_fun.h
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,