Skip to content

Instantly share code, notes, and snippets.

View post_opt
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Super Heavy, But Optimized Website</title>
<meta name="description" content="A website that loads in 2.5 seconds is something you should see often!">
View pre_opt
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Super Heavy Website</title>
<meta name="description" content="A website that loads in 25 seconds is not something you see often!">
@g-P
g-P / phpredisadmin.conf
Created Sep 24, 2014
Add phpRedisAdmin to apache2
View phpredisadmin.conf
Alias /phpredisadmin /var/www/redisadmin
<Directory /var/www/redisadmin>
Options FollowSymLinks
DirectoryIndex index.php
<IfModule mod_php5.c>
AddType application/x-httpd-php .php
php_flag magic_quotes_gpc Off
View eloquent_chapters.links
@g-P
g-P / print_gitbook.js
Last active Jan 26, 2022
Print Git Books
View print_gitbook.js
/*
If you try to print a gitbook directly, you get nothing but the contents because of their *just* use of `@media print` styling to hide away the content section of the books.
Fret not, here is the codez:
*/
$(".book-header,.book-summary,.navigation,.book-progress").remove();
$(".book.with-summary .book-body").css('left', '0px');
$("*").css('position', 'static');
window.print()