Skip to content

Instantly share code, notes, and snippets.

View altherlex's full-sized avatar

Alther Alves altherlex

View GitHub Profile
@altherlex
altherlex / notes.txt
Last active August 29, 2015 14:21
write down about nodejs and many awesome tools
#phantomjs
Make integration tests with phantomjs: http://phantomjs.org/
http://staal.io/blog/2013/08/17/incredibly-convenient-testing-of-frontend-javascript-with-node-dot-js/
#http://nightwatchjs.org/
#lambda3 (Giovanni Bassi)
http://blog.lambda3.com.br/
#jsdom
https://github.com/tmpvar/jsdom
@altherlex
altherlex / alter_clipboard.ahk
Created May 20, 2015 23:26
alter_clipboard.ahk
;^c::
#Persistent
return
OnClipboardChange:
ClipWait
StringReplace, clipboard, clipboard, STRING_REPLACE, STR , All
clipboard = %clipboard%
return
@altherlex
altherlex / index.rdoc
Last active August 29, 2015 14:21
Tools for nodejs webservice and client-side architecture
  • Rewire (require module): Easy dependency injection for node.js unit testing

  • Mocha (to test js)

  • Moment: Parse, validate, manipulate, and display dates in JavaScript.

  • Swagger: A Powerful Interface to your RESTful API

  • usejsdoc

  • Yeoman(make scaffold): to kickstart new projects, prescribing best practices and tools to help you stay productive

  • Underscore: useful functional programming helpers

  • MVC client-side: AngularJs vs Backbone vs Emberjs

  • ApacheBench: Tool for benchmarking the HTTP server

@altherlex
altherlex / git_commands.rb
Last active July 13, 2022 20:49
git commands
stty sane
# Discard unstaged changes
git checkout file
# For all unstaged files use:
git checkout -- .
#http://rogerdudler.github.io/git-guide/index.pt_BR.html
# remove from stage
git reset file
@altherlex
altherlex / bash.ssh
Last active October 26, 2016 19:33
Track Back around who execute your method
# All users crontab. More http://www.thegeekstuff.com/2009/11/how-to-install-edit-or-remove-cron-jobs-in-batch-mode/
ls /var/spool/cron/crontabs/
# An array with a list of files who invoke to irrive in method inspected.
ruby method caller
# list all linux users
cat /etc/passwd
# list w/ filters
@altherlex
altherlex / template-jenkins-railsapp.markdown
Last active April 28, 2016 20:38
template-steps-jenkins-railsapp

###1-bundle

Verifica qualquer alteração no repositório remote e dispara um bundle install
if ! gem list | grep -q bundler 
then
  gem install bundler
fi
bundle

###2-unittest

@altherlex
altherlex / starting_w_DOCKER
Last active February 14, 2016 02:36
starting_w_DOCKER
vim +PluginInstall +qall
vi ../.vimrc
vim README.md
vim .
sudo vi /etc/fstab
open /Volumes
bash --login '/Applications/Docker/Docker Quickstart Terminal.app/Contents/Resources/Scripts/start.sh'
ps -ef | grep -i docker
ps -ef | grep -i vm
docker-machine env default
@altherlex
altherlex / homebrew_multiple_mysql_versions.md
Last active February 15, 2016 12:31 — forked from benlinton/multiple_mysql_versions_for_development.md
Multiple MySQL Versions with Homebrew

more tips

Multiple MySQL Versions with Homebrew

For homebrew version 0.9.5.

brew -v # => Homebrew 0.9.5

Install the current version of mysql.

@altherlex
altherlex / devops.md
Last active September 26, 2016 16:43
hints
@altherlex
altherlex / optparse+rake.rb
Created April 20, 2016 19:10
How use optparse gem into rake tasks
require 'optparse'
namespace :programs do |args|
desc "Download whatever"
task :download => [:environment] do
# USAGE: rake programs:download -- rm
#-- Setting options $ rake programs:download -- --rm
options = {}
option_parser = OptionParser.new