Skip to content

Instantly share code, notes, and snippets.

View ricardodovalle's full-sized avatar

Ricardo do Valle ricardodovalle

  • São Paulo, Brazil
View GitHub Profile
@ricardodovalle
ricardodovalle / gitBash_windows.md
Created September 8, 2025 19:13 — forked from evanwill/gitBash_windows.md
how to add more utilities to git bash for windows, wget, make

How to add more to Git Bash on Windows

Git for Windows comes bundled with the "Git Bash" terminal which is incredibly handy for unix-like commands on a windows machine. It is missing a few standard linux utilities, but it is easy to add ones that have a windows binary available.

The basic idea is that C:\Program Files\Git\mingw64\ is your / directory according to Git Bash (note: depending on how you installed it, the directory might be different. from the start menu, right click on the Git Bash icon and open file location. It might be something like C:\Users\name\AppData\Local\Programs\Git, the mingw64 in this directory is your root. Find it by using pwd -W). If you go to that directory, you will find the typical linux root folder structure (bin, etc, lib and so on).

If you are missing a utility, such as wget, track down a binary for windows and copy the files to the corresponding directories. Sometimes the windows binary have funny prefixes, so

Windows 10 - Using Git Bash With TMUX

Why Not Use WSL?

I tried the WSL and it isn't quite seamless enough for me. I ran in to problems when editing in VSCode and having watchers on my files (ng serve, dotnet watch run, etc.). In addition, I kept running in to problems that only manifest themselves when running in WSL. For example, this issue with doing production builds and the terser plugin has made many a developer rage-quit on using WSL. Just figuring out that it was an issue with the WSL took a lot of time.

That terser plugin issue was never resolved and I ended up having to keep a git bash window open in addition to my WSL console window so I could do production builds. To make matters worse, my npm packages were platform-dependent so I couldn't use the same project folder. So, my procedure was: commit whatever changes to test branch, push to repo, git pull on my "windows" project folder, and do a production build there

@ricardodovalle
ricardodovalle / DefaultKeyBinding.dict
Created February 24, 2022 02:06
mac: binding home/end keys
source:
https://medium.com/@elhayefrat/how-to-fix-the-home-and-end-buttons-for-an-external-keyboard-in-mac-4da773a0d3a2
https://www.maketecheasier.com/fix-home-end-button-for-external-keyboard-mac/
sudo bash
mkdir -p ~/Library/KeyBindings ; cd ~/Library/KeyBindings
vim DefaultKeyBinding.dict
{
@ricardodovalle
ricardodovalle / 1 setup vps
Created September 26, 2017 00:32 — forked from alekpopovic/1 setup vps
Deploy Rails 5.1.1 to VPS(Ubuntu 16.04.2 LTS). Nginx mainline + pagespeed, Puma with Jungle, Capistrano3, PostgreSQL 9.6, RVM, Certbot
root# apt-get update
root# apt-get upgrade
// dependencies for Ruby
root# apt-get install -y git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev \
libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev \
libpcre3-dev unzip
// Node.js v7
root# curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -
@ricardodovalle
ricardodovalle / inputmask.js
Created June 2, 2015 20:58
Meteor with "bigdsk:inputmask"
// Config file at "client/lib/inputmask.js" - I used this to create a new mask type
$.extend($.inputmask.defaults.definitions, {
H: {
validator: '[0-9a-fA-F]',
cardinality: 1
}
});
namespace('App.data')
###
Meteor pagination class
Usage
UsersController = RouteController.extend
waitOn: ->
@page = @params.query.page || 1
@pagination = new App.data.Pagination(Users, selector, {page: @page})
@ricardodovalle
ricardodovalle / .vimrc
Created March 11, 2015 18:50
my vimrc
" Note: Skip initialization for vim-tiny or vim-small.
if !1 | finish | endif
if has('vim_starting')
set nocompatible " Be iMproved
" Required:
set runtimepath+=~/.vim/bundle/neobundle.vim/
endif
= simple_form_for person, remote: true do |f|
.row
.col-xs-12.col-sm-12.col-md-6
= f.fields_for :address do |builder|
= render 'form_address', f: builder
# This is a skeleton for testing models including examples of validations, callbacks,
# scopes, instance & class methods, associations, and more.
# Pick and choose what you want, as all models don't NEED to be tested at this depth.
#
# I'm always eager to hear new tips & suggestions as I'm still new to testing,
# so if you have any, please share!
#
# @kyletcarlson
#
# This skeleton also assumes you're using the following gems:
@ricardodovalle
ricardodovalle / foreman.rb
Created July 9, 2014 02:22
Only a foreman sudo approch (not working)
namespace :foreman do
desc <<-DESC
Export the Procfile to upstart.
You can override any of these defaults by setting the variables shown below.
set :foreman_cmd, "foreman"
set :foreman_format, "upstart"
set :foreman_location, "/etc/init"
set :foreman_port, 5000