Skip to content

Instantly share code, notes, and snippets.

View DanFerrer's full-sized avatar
🥊
Focusing

Daniel Ferrer DanFerrer

🥊
Focusing
  • Spotify
  • United States
View GitHub Profile

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@DanFerrer
DanFerrer / what-forces-layout.md
Created March 19, 2019 21:59 — forked from paulirish/what-forces-layout.md
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Element

Box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
  • elem.clientLeft, elem.clientTop, elem.clientWidth, elem.clientHeight
  • elem.getClientRects(), elem.getBoundingClientRect()
@DanFerrer
DanFerrer / ultimate-ut-cheat-sheet.md
Created October 1, 2018 18:48 — forked from yoavniran/ultimate-ut-cheat-sheet.md
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai and Sinon

The Ultimate Unit Testing Cheat-sheet

For Mocha, Chai and Sinon

using mocha/chai/sinon for node.js unit-tests? check out my utility: mocha-stirrer to easily reuse test components and mock require dependencies


@DanFerrer
DanFerrer / sublime-text-3-setup.md
Created March 29, 2017 19:31 — forked from ijy/sublime-text-3-setup.md
My Sublime Text 3 setup.

Sublime Text 3 Setup

Install Package Control

Install Package Control for easy package management.

  1. Open the console with Ctrl+`
  2. Paste in the following:
@DanFerrer
DanFerrer / gist:e9e1f2c12c7c6bfd87d2
Created March 25, 2015 00:49
Practice Bootstrap classes with AngularJS two way data binding
<!DOCTYPE html>
<html ng-app="sampleApp" lang="en">
<head>
<meta charset="UTF-8">
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
<link rel="stylesheet"href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap-theme.min.css">
<title>Practice With Bootstrap</title>
<script>
angular.module('sampleApp', []).controller('practiceController', function($scope) {
require 'pry'
require 'pry-nav'
def create_groups(student_list, group_size, total_days)
binding.pry
# groups = student_list.each_slice(group_size) {|student| p student}
# return groups
my_student_list = student_list
groups = Array.new(total_days, Array.new(group_size))
groups.map! do |students|
@DanFerrer
DanFerrer / daniel_ferrer.html
Last active August 29, 2015 14:13
Dan's Student Profile
<!-- Begin Student Index -->
<div id="random-full-width-content" class="this-div-is-just-a-helpful-container">
<div class="section section-services student-index">
<div class="section-title">
<span>Flatiron School Class 003</span>
</div>
</div>
<div class="section section-blog">