Skip to content

Instantly share code, notes, and snippets.

View bytehead's full-sized avatar
🏄‍♂️

David Greminger bytehead

🏄‍♂️
View GitHub Profile
@bytehead
bytehead / keybase.md
Created July 18, 2016 17:31
Keybase proof

Keybase proof

I hereby claim:

To claim this, I am signing this object:

@bytehead
bytehead / pdf_to_jpg.php
Last active May 10, 2019 20:41
imagick pdf to jpg
<?php
// read page 1
$im = new imagick( 'test.pdf[ 0]' );
// convert to jpg
$im->setImageColorspace(255);
$im->setCompression(Imagick::COMPRESSION_JPEG);
$im->setCompressionQuality(60);
$im->setImageFormat('jpeg');
@bytehead
bytehead / last_child.js
Last active December 18, 2015 07:48
last-child selector in ie8
// there is a solution for jQuery < 1.9.0, where you can use `$.browser`:
// https://gist.github.com/nathansmith/950767
// but jQuery removed `$.browser` in version 1.9.0, so you have to get another way:
function last_child() {
if (/msie [1-8]{1}[^0-9]/.test(navigator.userAgent.toLowerCase())) {
$('*:last-child').addClass('last-child');
}
}