Skip to content

Instantly share code, notes, and snippets.

View pedrolopez's full-sized avatar

Pedro López pedrolopez

View GitHub Profile

Keybase proof

I hereby claim:

  • I am pedrolopez on github.
  • I am lopezpedro (https://keybase.io/lopezpedro) on keybase.
  • I have a public key ASC-ljYaKo676dThfgd7n_3IhVH91HPIGt_Ufamyn3x70wo

To claim this, I am signing this object:

#!/usr/bin/env sh
# checks to see if running
launchctl list | grep elasticsearch
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.elasticsearch.plist
launchctl remove homebrew.mxcl.elasticsearch
pkill -f elasticsearch
@pedrolopez
pedrolopez / homebrew old version.txt
Created May 29, 2020 22:01 — forked from sawant/homebrew old version.txt
Install older version of Formula in Homebrew
[From: http://hanxue-it.blogspot.com/2018/08/macos-homebrew-installing-older-version-of-software.html - just created a copy to keep it for long term]
Homebrew always wants to install the latest version of the Formula (software). This is by design, because every time there is an update to a formula, it wants to be tested against all the other formulas that it depends on. Mixing new and old versions of software is a recipe for incompatibility disaster.
But sometimes there are situations where you need an older version of software. In my specific case, Yarn was compiled against an older version of icu4c, and I want that older version instead of recompiling Yarn.
$ yarn install
dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.61.dylib
Referenced from: /usr/local/bin/node
@pedrolopez
pedrolopez / osx_defaults.sh
Created November 10, 2019 01:36 — forked from vraravam/osx-defaults.sh
OSX Defaults to setup a brand new machine
#!/usr/bin/env bash
echo "Need to recapture iTerm settings"
exit -1
# TODO: Need to figure out the settings for the following:
# 1) Finder: Left nav, favorite items with their order
# 2) Dock: Items with order
# 3) Security & Privacy Preferences: Full Disk Access, Camera, Microphone
# 4) Login items for my user (i.e. apps started when I login)
@pedrolopez
pedrolopez / iterm2-solarized.md
Created October 12, 2019 22:19 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@pedrolopez
pedrolopez / install-multiple-jdk-on-macos-high-sierra.md
Created February 2, 2019 18:23 — forked from ntamvl/install-multiple-jdk-on-macos-high-sierra.md
Install Multiple Java Versions on macOS High Sierra

Install Multiple Java Versions on macOS High Sierra

Install Homebrew Cask

On Mac, Homebrew is the de-facto package manager, and Homebrew Cask is the app manager. I’m going to use Cask to install Java 7 and 8.

Install Homebrew Cask first if you haven’t:

brew update
brew tap caskroom/cask

The JSON API Standard

What is the JSON API Standard

The Specification

  • The History
  • Why does it exist?
    • Bike Shedding/LookingFor
  • Do we have to use it?
@pedrolopez
pedrolopez / cloud9-postgresql-rails-howto.md
Created August 3, 2018 03:01 — forked from eliotsykes/cloud9-postgresql-rails-howto.md
How to setup PostgreSQL & Rails on Cloud9

How to setup PostgreSQL & Rails on Cloud9

At time of writing, Cloud9 has PostgreSQL pre-installed, so you won't need to install it yourself. However, its not running by default, so you will need to start it with this command in the terminal:

sudo service postgresql start

Change the PostgreSQL password to 'password' (or choose a different password):

@pedrolopez
pedrolopez / arr_flatten.rb
Created September 22, 2017 22:04
Flatten an array
def recursively_flatten_an_array(nested_array, flattened_array = [])
nested_array.each do |obj|
unless obj.is_a? Array
flattened_array << obj
else
recursively_flatten_an_array(obj, flattened_array)
end
end
return flattened_array
@pedrolopez
pedrolopez / INSTALLATION.md
Created May 18, 2016 20:00 — forked from DenisIzmaylov/INSTALLATION.md
OS X 10.11 El Capitan: fresh install with Node.js (io.js) Developer Environment

OS X 10.11 (El Capitan) / Node.js and io.js Developer Environment

Custom recipe to get OS X 10.11 El Capitan running from scratch with useful applications and Node.js Developer environment. I use this gist to keep track of the important software and steps required to have a functioning system after fresh install.

Content