Skip to content

Instantly share code, notes, and snippets.

View briangonzalez's full-sized avatar
🏠
🚚

Brian Gonzalez briangonzalez

🏠
🚚
View GitHub Profile
@briangonzalez
briangonzalez / howto.md
Last active January 5, 2020 18:59
Installing Dropbox on CentOS

Setup Dropbox for system startup

The following instructions will get you setup to run Dropbox at system start. Below, also find instructions on how to install the Dropbox CLI.

# Login as root and go into home dir.
sudo su && cd ~

# Download Dropbox depending on architecture (uname -a) and unpack.
# You will need to repeat this "download and unpack" step for all users
@briangonzalez
briangonzalez / FontPrep Clean & Restart.md
Last active December 27, 2015 02:38
FontPrep Clean & Restart

Open Terminal.app on your Mac and issue the following commands.

Step 1

Backup FontPrep files:

mv ~/Library/Application\ Support/FontPrep ~/Library/Application\ Support/FontPrep.old

Step 2

Kill the currently running server:

{"tweets": [{
"name": "Classy Sloth",
"img": "https://s3.amazonaws.com/uifaces/faces/twitter/idiot/128.jpg",
"tweet": "I am a sloth, hear me roar. #slothsays"
},
{
"name": "Classy Sloth",
"img": "https://s3.amazonaws.com/uifaces/faces/twitter/idiot/128.jpg",
"tweet": "I am a sloth, hear me roar. #slothsays"
},
@briangonzalez
briangonzalez / rbenv-systemwide-installer.sh
Last active August 10, 2016 02:11
Install rbenv systemwide
#!/usr/bin/env bash
# Verify Git is installed:
if [ ! $(which git) ]; then
echo "Git is not installed, can't continue."
exit 1
fi
if [ -z "${RBENV_ROOT}" ]; then
RBENV_ROOT="/usr/local/rbenv"
@briangonzalez
briangonzalez / angular-with-server-side-rendering.md
Last active August 29, 2015 13:56
Using Angular w/ Server side rendering

Hey Tim, so I am going to try my best here. It's Friday, bear with me.

Us engineers here at Dollar Shave Club have come to determine that Angular really, really excels at user interface scripting. It's not as good as others at model operations like create/read/update/destroy. But it's really, really good at UI.

It removes all of the tedious $('.my-button').on('click', function(){}) that one typically does when building a simple jQuery/JS scripted site. Event handlers, global variables that manage state of UI elements, variable passing all quickly turn into spaghetti code. When building these kinds of sites, we were always left wondering Where should we store state?, Where should we store information about this or that?, Which file is that event handler located in?, etc.

In Angular, you get this for free. If you want to script a set of DOM elements on a page, you use a "Controller" or add that logic straight into the markup*. If you want to wrap up arbitary functionality or data, you throw that in

#!/bin/bash
NVM_BASE_DIR=/usr/local
NVM_DIR="$NVM_BASE_DIR/nvm"
if ! hash git 2>/dev/null; then
echo >&2 "You need to install git - visit http://git-scm.com/downloads"
echo >&2 "or, use install-gitless.sh instead."
exit 1
fi
@briangonzalez
briangonzalez / SassMeister-input-HTML.html
Created May 5, 2014 17:48
Generated by SassMeister.com.
<h1>The quick brown fox jumps over the lazy dog<h1>
<h2>The quick brown fox jumps over the lazy dog<h2>
<h3>The quick brown fox jumps over the lazy dog<h3>
<h4>The quick brown fox jumps over the lazy dog<h4>
<h5>The quick brown fox jumps over the lazy dog<h5>
<h6>The quick brown fox jumps over the lazy dog<h6>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quippe: habes enim a rhetoribus; Sed haec nihil sane ad rem; Ita ne hoc quidem modo paria peccata sunt. Immo istud quidem, inquam, quo loco quidque, nisi iniquum postulo, arbitratu meo. Sed ne, dum huic obsequor, vobis molestus sim. Cuius ad naturam apta ratio vera illa et summa lex a philosophis dicitur. Age, inquies, ista parva sunt. An me, inquam, nisi te audire vellem, censes haec dicturum fuisse? Duo Reges: constructio interrete. At, si voluptas esset bonum, desideraret. Quid enim de amicitia statueris utilitatis causa expetenda vides. Quae fere omnia appellantur uno ingenii nomine, easque virtutes qui habent, ingeniosi vocantur. Tecum op
@briangonzalez
briangonzalez / SassMeister-input-HTML.html
Created May 5, 2014 21:40
Generated by SassMeister.com.
<h1>The Quick Brown Fox</h1>
<h2>Jumps over the yellow dog</h2>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Primum cur ista res digna odio est, nisi quod est turpis? Qua tu etiam inprudens utebare non numquam. Tanta vis admonitionis inest in locis; Mihi enim satis est, ipsis non satis. Sine ea igitur iucunde negat posse se vivere? Quamquam tu hanc copiosiorem etiam soles dicere. Duo Reges: constructio interrete. Quid turpius quam sapientis vitam ex insipientium sermone pendere? Quorum altera prosunt, nocent altera.Lorem ipsum dolor sit amet, consectetur adipiscing elit. Videamus igitur sententias eorum, tum ad verba redeamus. Quo modo autem optimum, si bonum praeterea nullum est? Tecum optime, deinde etiam cum mediocri amico. Sed quanta sit alias, nunc tantum possitne esse tanta. Duo Reges: constructio interrete. Quid enim possumus hoc agere divinius?
Tu enim ista lenius, hic Stoicorum more nos vexat. Quae cum magnifice primo dici viderentur, considerata minus probabantur. Quasi ego id cure
@briangonzalez
briangonzalez / SassMeister-input.scss
Created May 12, 2014 18:36
Generated by SassMeister.com.
// ----
// Sass (v3.3.7)
// Compass (v1.0.0.alpha.18)
// SassyLists (v)
// ----
@import "SassyLists";
@mixin slice($slices...) {
@briangonzalez
briangonzalez / icons.js
Last active August 29, 2015 14:01
icons
App.Icons = DS.Model.extend({
contents: DS.attr('string')
});
App.IconsSerializer = DS.RESTSerializer.extend({
normalize: function() {
console.log('normalize!');
}
});