Skip to content

Instantly share code, notes, and snippets.

View eduardostuart's full-sized avatar
🦾

Eduardo Stuart eduardostuart

🦾
View GitHub Profile
@paulirish
paulirish / what-forces-layout.md
Last active July 19, 2025 12:35
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.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@bendrucker
bendrucker / droplr-gh.md
Last active February 1, 2021 12:30
Pasting droplr image/gif links to Github

Droplr will auto-copy the sharing link when you take a screenshot. You'll use this on GitHub.

That copied link will look like this: http://d.pr/i/13PDt

To paste that into a GitHub issue:

![](http://d.pr/i/13PDt+)
@taylorotwell
taylorotwell / gist:db67dd369b00022850b4
Last active January 23, 2025 08:49
Mac Yosemite Dev Machine Setup

XCode

  • Install XCode from App Store.
  • Open XCode and agree to terms and conditions.

XCode CLI Tools

  • xcode-select --install

Install Homebrew

@danharper
danharper / gulpfile.js
Last active September 25, 2024 09:04
New ES6 project with Babel, Browserify & Gulp
var gulp = require('gulp');
var sourcemaps = require('gulp-sourcemaps');
var source = require('vinyl-source-stream');
var buffer = require('vinyl-buffer');
var browserify = require('browserify');
var watchify = require('watchify');
var babel = require('babelify');
function compile(watch) {
var bundler = watchify(browserify('./src/index.js', { debug: true }).transform(babel));
/**
* Destroy the user's session (logout).
*
* @return Response
*/
public function destroy()
{
Auth::logout();
flash()->info('You are now logged out.');
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
@fkling
fkling / App.js
Last active February 1, 2018 03:43
Bootstrap files for React + JSX with browserify and gulp.js
"use strict";
// Use
// var React = require('./react');
// instead if you are loading React externally, via a <script> element
var React = require('react');
var App = React.createClass({
render: function() {
return <h3>Hello World!</h3>;
@staltz
staltz / introrx.md
Last active July 21, 2025 07:30
The introduction to Reactive Programming you've been missing
@ktmud
ktmud / gulpfile.js
Last active February 28, 2022 10:39
An example gulpfile.js with bower components and live reload support
var BatchStream = require('batch-stream2')
var gulp = require('gulp')
var coffee = require('gulp-coffee')
var uglify = require('gulp-uglify')
var cssmin = require('gulp-minify-css')
var bower = require('gulp-bower-files')
var stylus = require('gulp-stylus')
var livereload = require('gulp-livereload')
var include = require('gulp-include')
var concat = require('gulp-concat')
@allaniftrue
allaniftrue / filters.php
Last active March 16, 2019 19:00
Laravel Minify HTML response
<?php
/*
* An improvised Gist from
* https://gist.github.com/zmsaunders/5619519
* https://gist.github.com/garagesocial/6059962
*/
App::after(function($request, $response)
{
if(App::Environment() != 'local')