Skip to content

Instantly share code, notes, and snippets.

View rmacian's full-sized avatar

Raúl Macián rmacian

View GitHub Profile
@rmacian
rmacian / mymac.md
Last active April 20, 2022 13:46
mac first steps

ohmyzsh:

sh -c "$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"

non-breaking space:

mkdir ~/Library/KeyBindings
cat <<EOT >> ~/Library/KeyBindings/DefaultKeyBinding.dict
{
"~ " = ("insertText:", " ");
@rmacian
rmacian / trailing
Created April 8, 2020 19:40
Delete trailing spaces
#al crear un fichero con kubectl --from-file lo va a crear como un string escapado si hay espacios antes del final de linea, en OSX:
sed -i '' -e's/[[:space:]]*$//' fichero
@rmacian
rmacian / Makefile
Last active September 18, 2018 12:40
Build rpm with fpm
# This is how we want to name the binary output
#
VERSION := 3.7.62
PKGNAME := openshift-clients
LICENSE := Apache 2.0
VENDOR=
URL := https://github.com/openshift/origin
RELEASE := 1.git.0.ba171ec.el6
USER := root
ARCH := amd64
Notice: /Stage[main]/Mongodb::Server::Install/Package[mongodb_server]/ensure: created
Notice: /Stage[main]/Mongodb::Server::Config/File[/etc/mongod.conf]/content: content changed '{md5}2d020b14d69a0a51753694d8c5b3a449' to '{md5}967d4c8217739ed0a116b4a9377ccbb9'
Notice: /Stage[main]/Mongodb::Server::Service/Service[mongodb]: Triggered 'refresh' from 1 events
Notice: /Stage[main]//Node[mongo1]/Mongodb_replset[opengvp]/ensure: created
Notice: /Stage[main]/Opengvpmongo::Databases/Mongodb::Db[uc_adapter]/Mongodb_database[uc_adapter]/ensure: created
Error: /Stage[main]/Opengvpmongo::Databases/Mongodb::Db[uc_adapter]/Mongodb_user[nvp]: Could not evaluate: Execution of '/usr/bin/mongo uc_adapter --quiet --eval db.system.users.find({user:"nvp"}).count()' returned 252: Fri Jan 31 12:07:12.948 count failed: { "errmsg" : "not master", "note" : "from execCommand", "ok" : 0 } at src/mongo/shell/query.js:180