Skip to content

Instantly share code, notes, and snippets.

View felippenardi's full-sized avatar

Felippe Nardi felippenardi

View GitHub Profile
@felippenardi
felippenardi / bookmarklet.js
Created January 18, 2016 16:39
Pivotal Tracker Branch Naming Generator
javascript: (function ($) {
var storyTitles = [];
var story = $('.story .details').closest('.story').first();
if(story){
var title = story.find('.editor.name').val();
var id = /story_(\d+)/.exec(story.attr('class'))[1];
var storyType = story.find(".story_type .selection").text();
var gitptTitle = id + '-' + title;
var translate = {
"ä": "ae", "ö": "oe", "ü": "ue", "ß": "ss"
@felippenardi
felippenardi / post-commit
Last active October 20, 2015 01:37
Sending your commits to Rescue Time
#!/bin/sh
#
# An example hook script to log commit messages
# as a 'daily highlight' in RescueTime Premium
#
# See README.md for more information
#
# To enable this hook:
#
# 1. Place this file in .git/hooks and rename to "post-commit".
@felippenardi
felippenardi / vim-with-pathogen.md
Created September 18, 2015 22:09
Using Vim Pathogen with git submodules

Updating all submodules after clonning your vim files

git submodule update --init --recursive

@felippenardi
felippenardi / readme.md
Last active February 1, 2024 11:06
Benchmarking AngularJS performance

Benchmarking AngularJS performance

Things to optmize

  • Use one-time-bind on expressions ( {{::value}} )
  • Replace $scope.$apply() with $scope.$digest() whenever possible
  • Move filters to controllers

Measuring Watch list

To get the total watchers on the current page, you can run this script on the browser console:

@felippenardi
felippenardi / running-protractor-with-docker.md
Last active July 19, 2020 04:38
Running Protractor Headless with Docker

Running Protractor Headless with Docker

Setting up Docker

1st Docker: Selenium Webdriver

This docker image is a Selenium Webdriver server where our specs will be directed against. It contains the Firefox and Chrome to run our specs headless. It also provides us VNC access to check what is going on the browser.

$ docker run --rm --net="host" -e VNC_PASSWORD=pancakes elgalu/selenium:v2.45.0-ssh3
@felippenardi
felippenardi / README.md
Created June 1, 2015 17:56
SVN Statuses Cheatsheet

The common SVN statuses cheatsheet

  • U: Working file was updated
  • G: Changes on the repo were automatically merged into the working copy
  • M: Working copy is modified
  • C: This file conflicts with the version in the repo
  • ?: This file is not under version control
  • !: This file is under version control but is missing or incomplete
  • A: This file will be added to version control (after commit)
  • A+: This file will be moved (after commit)
@felippenardi
felippenardi / README.md
Last active August 29, 2015 14:22
Running Protractor tests

Running Protractor tests

Initiating the web driver runner

$ npm install -g protractor # installs Protractor
$ webdriver-manager update # downloads Selenium and Chrome
$ webdriver-manager start # start Selenium server
@felippenardi
felippenardi / _readme.md
Last active November 28, 2016 09:34 — forked from larryxiao/_readme.md
Script to Install Tmux 2.0 on Ubuntu

Having trouble installing the latest stable version of tmux?

I know, official package for your OS/distro is outdated and you just want the newest version of tmux.

Well, this script should save you some time with that.

Prerequisities

  • gcc

Xvfb configuration for Dockerfiles

Goes into /etc/init.d/xvfb