Skip to content

Instantly share code, notes, and snippets.

Josue Zarzosa josketres

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
paulirish / what-forces-layout.md
Last active Sep 16, 2019
What forces layout/reflow. The comprehensive list.
View what-forces-layout.md

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()
@ischenkodv
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
johnjohndoe / android-sdk-setup.sh
Last active Jun 12, 2019
Creating symbolic links in Android SDK folder. After Android-Studio resp. IntelliJ will work with Maven and Gradle.
View android-sdk-setup.sh
#!/bin/bash
# Author: Tobias Preuss
# Version: 2018-01-05
echo "Creating symbolic links in Android SDK folder"
echo "============================================="
echo
if [ -z "$ANDROID_HOME" ] ; then
@scrogson
scrogson / README.md
Last active Nov 14, 2017
Shell functions to aid in using hub(1) with GitHub Enterprise.
View README.md

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.com. GitHub Enterprise hosts need to be whitelisted to configure hub to treat such remotes same as github.com:

$ git config --global --add hub.host my.git.org
@ElliotChong
ElliotChong / facebookPluginDirectives.coffee
Created Oct 9, 2012
Angular directives that will parse Facebook plugins added to the DOM after Facebook has been initialized
View facebookPluginDirectives.coffee
module = angular.module 'FacebookPluginDirectives', []
createDirective = (name) ->
module.directive name, ->
restrict: 'C'
link: (scope, element, attributes) ->
FB?.XFBML.parse(element.parent()[0])
createDirective pluginName for pluginName in ['fbActivity', 'fbComments', 'fbFacepile', 'fbLike', 'fbLikeBox', 'fbLiveStream', 'fbLoginButton', 'fbName', 'fbProfilePic', 'fbRecommendations']
@FlaviuSim
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
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.actor.{Actor,ActorRef}
import akka.actor.Actor._
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.