Skip to content

Instantly share code, notes, and snippets.

View jelmerdemaat's full-sized avatar

Jelmer jelmerdemaat

View GitHub Profile
@jelmerdemaat
jelmerdemaat / assert-selector.scss
Created November 20, 2015 13:16
assert-selector mixin
// Assert that the parent selector matches one of the selectors passed into $selectors
// Url: https://github.com/dropbox/scooter/blob/e4d1ffc42e6f4d787fffa94bd96397e9b862a2f3/scss/mixins/_accessibility.scss
@mixin assert-selector($selectors...) {
&:not(#{$selectors}) {
/*! You must ensure the element matches one of these selectors: #{$selectors} */
outline: 2px solid red !important;
outline-offset: 5px;
position: relative;
&:before {
@jelmerdemaat
jelmerdemaat / SassMeister-input.scss
Created November 18, 2015 10:29
Generated by SassMeister.com.
// ----
// libsass (v3.2.5)
// ----
$color-a: red;
$color-a-light: lighten(red, 20%);
$color-b: blue;
$color-b-light: lighten(blue, 20%);
$color-c: green;
$color-c-medium: lighten(green, 20%);
var React = require('react');
var HelloMessage = React.createClass({
render: function() {
return mustache(templateName, this.props);
}
});
module.exports = HelloMessage;
@jelmerdemaat
jelmerdemaat / .htaccess
Created September 24, 2014 15:44
Selected htaccess rules from https://github.com/h5bp/html5-boilerplate, without extensive comments.
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
@jelmerdemaat
jelmerdemaat / sftp-config.json
Created September 23, 2014 14:09
Additional sftp-config ignore regexes gulp + sass project
"/node_modules/",
"/.sass-cache/",
"\\.sassc",
"\\.scssc",
"\\.log"
@jelmerdemaat
jelmerdemaat / .gitignore
Last active August 29, 2015 14:06
Basic .gitignore rules for node/sass project
# Exclude build folders
dist/
build/
app/
# Exclude node modules
node_modules/
# Exclude sass cache files
.sass-cache/
# Block the WordPress include-only files.
# Source: http://codex.wordpress.org/Hardening_WordPress#Securing_wp-includes
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^wp-admin/includes/ - [F,L]
RewriteRule !^wp-includes/ - [S=3]
RewriteRule ^wp-includes/[^/]+\.php$ - [F,L]
RewriteRule ^wp-includes/js/tinymce/langs/.+\.php - [F,L]
@jelmerdemaat
jelmerdemaat / bookmarklet.htm
Last active August 29, 2015 14:05
A simple bookmarklet to test the current page in Google PageSpeed.
<a href="javascript:(function(){window.open('//developers.google.com/speed/pagespeed/insights/?url='+window.location);})()">
Check page in Google PageSpeed
</a>
Here I stand head in hand
Turn my face to the wall
If she's gone I can't go on
Feeling two-foot small
Everywhere people stare
Each and every day
I can see them laugh at me
And I hear them say
@jelmerdemaat
jelmerdemaat / .bashrc
Last active August 29, 2015 14:03
Useful Terminal aliases
# Move around quicker
alias ..="cd .."
# Show pretty file list using `list`
alias list="ls --color=always -s -h -g --sort=extension"
# Useful application shortcuts
alias chrome="google-chrome"