Skip to content

Instantly share code, notes, and snippets.

View diniscorreia's full-sized avatar

Dinis Correia diniscorreia

View GitHub Profile
@spf13
spf13 / script.js
Last active April 2, 2025 08:03 — forked from danmactough/script.js
Download all your Kindle books before Feb 26, 2025
// 1. Log in to your Amazon account
// 2. Go to your Content Library > Books - https://www.amazon.com/hz/mycd/digital-console/contentlist/booksAll/dateDsc/
// 3. Open your browser's Javascript console
// 4. For each page of books, paste this script into the console
(async function () {
// Close the notification if it appears
function closeNotification() {
const notifClose = document.querySelector("span#notification-close");
if (notifClose) {
@joao
joao / first_instagram_users.csv
Last active October 26, 2024 04:38
Instagram users up to ID 10000 (active as of 2018)
user_id username full_name link
3 kevin Kevin Systrom https://instagram.com/kevin
4 mikeyk Mike Krieger https://instagram.com/mikeyk
5 abbott @abbott🏌 https://instagram.com/abbott
6 nicole Nicole Systrom https://instagram.com/nicole
8 brow Tom Brow https://instagram.com/brow
10 standers https://instagram.com/standers
11 m Photographer of the Week https://instagram.com/m
12 kaitlyn Kaitlyn Krieger https://instagram.com/kaitlyn
13 uxgreg Greg Schwartz https://instagram.com/uxgreg
@craigmdennis
craigmdennis / _debug.scss
Last active March 21, 2023 02:31
Sass mixins for vertical rhythm and scoped typography with pixel fallback for IE.
$debug-rhythm: false;
@aprea
aprea / gist:82b5cf043ade04f55463
Created June 24, 2014 05:46
Only add the "add more" link when required
<?php
function ca_only_add_more_when_required( $default, $text, $options ) {
$text = strip_tags( $text );
if ( 'words' === $options['length_type'] ) {
$excerpt_length = str_word_count( $text );
} else {
$excerpt_length = strlen( $text );
}
@larrybotha
larrybotha / A.markdown
Last active May 1, 2025 17:28
Fix SVGs not scaling in IE9, IE10, and IE11

Fix SVG in <img> tags not scaling in IE9, IE10, IE11

IE9, IE10, and IE11 don't properly scale SVG files added with img tags when viewBox, width and height attributes are specified. View this codepen on the different browsers.

Image heights will not scale when the images are inside containers narrower than image widths. This can be resolved in 2 ways.

Use sed in bash to remove width and height attributes in SVG files

As per this answer on Stackoverflow, the issue can be resolved by removing just the width and height attributes.

@adactio
adactio / tabledisplaytest.html
Created August 16, 2011 10:36
Content-first table-display test
<!DOCTYPE html>
<html>
<head>
<title>Table Display test</title>
<style>
@media screen and (min-width: 30em) {
body {
display: table;
caption-side: top;
}