Skip to content

Instantly share code, notes, and snippets.

View juanfernandes's full-sized avatar

Juan Fernandes juanfernandes

View GitHub Profile
.nav {
&__list {
&__item {
&--featured {
}
}
}
}
@juanfernandes
juanfernandes / nfs-ubuntu.txt
Created September 25, 2015 14:52
How To Set Up an NFS Mount on Ubuntu 14.04
How To Set Up an NFS Mount on Ubuntu 14.04
Source: https://www.digitalocean.com/community/tutorials/how-to-set-up-an-nfs-mount-on-ubuntu-14-04
Apr 30, 2014 Networking Ubuntu
Introduction
NFS, or Network File System, is a distributed filesystem protocol that allows you to mount remote directories on your server. This allows you to leverage storage space in a different location and to write to the same space from multiple servers easily. NFS works well for directories that will have to be accessed regularly.
In this guide, we'll cover how to configure NFS mounts on an Ubuntu 14.04 server.
Prerequisites
@juanfernandes
juanfernandes / SassMeister-input-HTML.html
Created December 1, 2015 10:59
Generated by SassMeister.com.
<div class="foo">
Lorem ipsum dolor sit amet <br />
Lorem ipsum dolor sit amet
</div>
<div class="bar">
Lorem ipsum dolor sit amet <br />
Lorem ipsum dolor sit amet
</div>
@juanfernandes
juanfernandes / .bashrc
Created June 1, 2013 06:36
Add to end of .bashrc - removes username@machine and shows your current branch etc - see http://lancespeelmon.wordpress.com/2012/05/10/three-tips-for-creating-the-best-ever-git-command-line/
# http://lancespeelmon.wordpress.com/2012/05/10/three-tips-for-creating-the-best-ever-git-command-line/
c_cyan=`tput setaf 6`
c_red=`tput setaf 1`
c_green=`tput setaf 2`
c_sgr0=`tput sgr0`
parse_git_branch ()
{
if git rev-parse --git-dir >/dev/null 2>&1
then
@juanfernandes
juanfernandes / get-text-content
Created September 2, 2013 09:10
Get text content from HTML with out html code.
Let's say you have the following HTML:
<div id="module">
<p>
This is some <b>example</b> text
<span>with some random markup.</span>
</p>
</div>
If you want to grab all the text content inside of #module, you can do this:
@juanfernandes
juanfernandes / countries.json
Created August 9, 2016 13:46 — forked from keeguon/countries.json
A list of countries in 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'},
*:focus {
outline: 2px solid rebeccapurple;
box-shadow: 0 1px 1px rgba(0,0,0,.075) inset,0 0 8px rebeccapurple;
}
@juanfernandes
juanfernandes / delete-all-git-branches-except-current.sh
Created October 2, 2017 14:10 — forked from maurobringolf/delete-all-git-branches-except-current.sh
Deletes all local Git branches except the current one.
#!/usr/bin/env bash
git branch | grep -v $(git rev-parse --abbrev-ref HEAD) | xargs git branch -D

Keybase proof

I hereby claim:

  • I am juanfernandes on github.
  • I am juanfernandes (https://keybase.io/juanfernandes) on keybase.
  • I have a public key ASCNPfnhhCmCmE2iGXsOlKcNB4MfPGdrKOm8AuoJDiYT7wo

To claim this, I am signing this object:

@juanfernandes
juanfernandes / change-class-on-scroll.html
Created December 11, 2017 15:43 — forked from ohiosveryown/change-class-on-scroll.html
Vanilla JS – change/add class based on scroll position.
<div id="header"></div>
<style>
#header {
position: fixed;
background: pink;
height: 72px;
width: 100%;
opacity: 0.2;
transition: all 300ms ease;