Skip to content

Instantly share code, notes, and snippets.

View JulaineScott's full-sized avatar
🌲

Julaine Scott JulaineScott

🌲
View GitHub Profile
//@source https://codepen.io/joshwcomeau/pen/mdVZKwr
.drop-shadow {
filter: drop-shadow(2px 4px 8px hsla(0deg, 0%, 0%, 0.5))
}
@JulaineScott
JulaineScott / make-slugs
Created April 7, 2020 05:14
Change php files to slugs
#1)externally redirect "/file.php" to "/file"
RewriteCond %{THE_REQUEST} /([^.]+)\.php [NC]
RewriteRule ^ /%1 [NC,L,R]
#2)Internally map "/file" back to "/file.php"
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.*?)/?$ /$1.php [NC,L]
@JulaineScott
JulaineScott / helpers.css
Created April 4, 2020 06:43
Lots of helpful CSS classes
.mt0{margin-top:0!important;}
.mt2{margin-top:2px!important;}
.mt5{margin-top:5px!important;}
.mt10{margin-top:10px!important;}
.mt15{margin-top:15px!important;}
.mt20{margin-top:20px!important;}
.mt25{margin-top:25px!important;}
.mt30{margin-top:30px!important;}
.mt35{margin-top:35px!important;}
.mt40{margin-top:40px!important;}
style="filter: invert(.95) sepia(.95);"
//disable the button the moment it is clicked
//make sure to check also on server side
<input type="submit" value="Submit" onclick="this.disabled=true" />
//bring in a dib with an id of part1 from another page:
$('#newArticle').load('inc/anotherPage.html #part1');
//simple ajax load of content (ie no post/get) from an external file
$('a[href="writeNew"]').click(function(e){ e.preventDefault(); $('#newArticle').load('inc/userWrite.php');});
@JulaineScott
JulaineScott / doc_block.php
Created November 8, 2018 21:29 — forked from BaylorRae/doc_block.php
Parse PHP Doc Blocks
<?php
class DocBlock {
public $docblock,
$description = null,
$all_params = array();
/**
* Parses a docblock;