Skip to content

Instantly share code, notes, and snippets.

Josue Zarzosa josketres

  • @eSailors
  • Hamburg, Germany
Block or report user

Report or block josketres

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
paulirish /
Last active Mar 31, 2020
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.


Box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
  • elem.clientLeft, elem.clientTop, elem.clientWidth, elem.clientHeight
  • elem.getClientRects(), elem.getBoundingClientRect()
joseluisq /
Last active Mar 31, 2020
Add Git Branch Name to Terminal Prompt (Mac)

Add Git Branch Name to Terminal Prompt (Mac)


Open ~/.bash_profile in your favorite editor and add the following content to the bottom.

# Git branch in prompt.

parse_git_branch() {
ischenkodv / RAFPlugin.js
Created Feb 28, 2015
Jasmine plugin to test functions with requestAnimationFrame.
View RAFPlugin.js
* Jasmine RequestAnimationFrame: a set of helpers for testing funcionality
* that uses requestAnimationFrame under the Jasmine BDD framework for JavaScript.
;(function() {
var index = 0,
callbacks = {};
function MockRAF(global) {
View .tmux.conf
# use vi mode
setw -g mode-keys vi
# remap prefix to Control + a
set -g prefix C-a
unbind C-b
bind C-a send-prefix
# force a reload of the config file
unbind r
johnjohndoe /
Last active Jun 12, 2019
Creating symbolic links in Android SDK folder. After Android-Studio resp. IntelliJ will work with Maven and Gradle.
# Author: Tobias Preuss
# Version: 2018-01-05
echo "Creating symbolic links in Android SDK folder"
echo "============================================="
if [ -z "$ANDROID_HOME" ] ; then
scrogson /
Last active Nov 14, 2017
Shell functions to aid in using hub(1) with GitHub Enterprise.

I recently started working at Blue Box and we use GitHub Enterprise (GHE) for all of our apps. I had gotten in the habit of using hub to improve my git workflow and was curious if I could use hub with GHE. I turned to the docs and sure enough, you can!

The docs tell you two ways of setting up hub to use GHE:

By default, hub will only work with repositories that have remotes which point to GitHub Enterprise hosts need to be whitelisted to configure hub to treat such remotes same as

$ git config --global --add
ElliotChong /
Created Oct 9, 2012
Angular directives that will parse Facebook plugins added to the DOM after Facebook has been initialized
module = angular.module 'FacebookPluginDirectives', []
createDirective = (name) ->
module.directive name, ->
restrict: 'C'
link: (scope, element, attributes) ->
createDirective pluginName for pluginName in ['fbActivity', 'fbComments', 'fbFacepile', 'fbLike', 'fbLikeBox', 'fbLiveStream', 'fbLoginButton', 'fbName', 'fbProfilePic', 'fbRecommendations']
FlaviuSim / .tmux.conf
Created Jun 24, 2012
Flaviu Simihaian's Tmux Conf
View .tmux.conf
# use vi mode
setw -g mode-keys vi
# remap prefix to Control + a
set -g prefix C-a
unbind C-b
bind C-a send-prefix
# force a reload of the config file
unbind r
viktorklang / CQRS_ES_Actor.scala
Created Feb 1, 2011
CQRS and EventSourcing using Akka Actors
View CQRS_ES_Actor.scala
import scala.collection.mutable.ListBuffer
import akka.routing.{ Listeners, Listen }
//Represents a domain event
trait Event
//A builder to create domain entities
trait EntityBuilder[Entity] {
You can’t perform that action at this time.