Skip to content

Instantly share code, notes, and snippets.

💭
Looking for a new contract

Juan Fernandes juanfernandes

💭
Looking for a new contract
Block or report user

Report or block juanfernandes

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View .eleventy.js
module.exports = function(eleventyConfig) {
// Pass through
eleventyConfig.addPassthroughCopy("assets/imgs");
return {
dir: {
input: "src",
output: "dist",
includes: "_includes",
data: "_data"
@juanfernandes
juanfernandes / change-class-on-scroll.html
Created Dec 11, 2017 — forked from ohiosveryown/change-class-on-scroll.html
Vanilla JS – change/add class based on scroll position.
View change-class-on-scroll.html
<div id="header"></div>
<style>
#header {
position: fixed;
background: pink;
height: 72px;
width: 100%;
opacity: 0.2;
transition: all 300ms ease;
View delete-all-git-branches-except-current.sh
#!/usr/bin/env bash
git branch | grep -v $(git rev-parse --abbrev-ref HEAD) | xargs git branch -D
View Gruntfile.js
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
// Watch task config
watch: {
sass: {
files: ['public/assets/css/src/*.scss','public/assets/css/src/partials/*.scss'],
tasks: ['sass']
},
php: {
@juanfernandes
juanfernandes / links-screenshot.png
Created Oct 8, 2016 — forked from scottgruber/links-screenshot.png
Build nav links with Perch pagelist addon and repeater
View a11y-stylish
*:focus {
outline: 2px solid rebeccapurple;
box-shadow: 0 1px 1px rgba(0,0,0,.075) inset,0 0 8px rebeccapurple;
}
View twitter-stylish
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document domain("twitter.com") {
/* styles for collapsing media in tweets and showing an arrow to indicate their existence
but only at the top level */
ol.stream-items > .expanding-stream-item:not(.open) .OldMedia,
ol.stream-items > .expanding-stream-item:not(.open) .AdaptiveMedia {
display: none;
}
@juanfernandes
juanfernandes / config.php
Created Sep 23, 2016
Multi server Perch config
View config.php
<?php
define('PERCH_LICENSE_KEY', '######-######-######-######-######');
switch($http_host) {
case('juanfernandes.co.uk/') :
define("PERCH_DB_USERNAME", '######');
define("PERCH_DB_PASSWORD", '######');
define("PERCH_DB_SERVER", "######");
define("PERCH_DB_DATABASE", "######");
define("PERCH_DB_PREFIX", "perch2_");
@juanfernandes
juanfernandes / mac.md
Created Aug 12, 2016 — forked from lornajane/mac.md
Keyboard Only OS X
View mac.md

Keyboard-only Mac Cheatsheet

Hi, I'm Lorna and I don't use a mouse. I have had RSI issues since a bad workstation setup at work in 2006. I've tried a number of extra hardware modifications but what works best for me is to use the keyboard and only the keyboard, so I'm in a good position and never reaching for anything else (except my coffee cup!). I rather unwisely took a job which required me to use a mac (I've been a linux user until now and also had the ability to choose my tools carefully) so here is my cheatsheet of the apps, tricks and keyboard shortcuts I'm using, mostly for my own reference. Since keyboard-only use is also great for productivity, you may also find some of these ideas useful, in which case at least something good has come of this :)

Apps List

There's more detail on a few of these apps but here is a quick overview of the tools I've installed and found helpful

Tool Link Comments
@juanfernandes
juanfernandes / countries.json
Created Aug 9, 2016 — forked from keeguon/countries.json
A list of countries in JSON
View countries.json
[
{name: 'Afghanistan', code: 'AF'},
{name: 'Åland Islands', code: 'AX'},
{name: 'Albania', code: 'AL'},
{name: 'Algeria', code: 'DZ'},
{name: 'American Samoa', code: 'AS'},
{name: 'AndorrA', code: 'AD'},
{name: 'Angola', code: 'AO'},
{name: 'Anguilla', code: 'AI'},
{name: 'Antarctica', code: 'AQ'},
You can’t perform that action at this time.