Skip to content

Instantly share code, notes, and snippets.

View tsolar's full-sized avatar

Tomás Solar Castro tsolar

  • Santiago, Chile
View GitHub Profile
@tsolar
tsolar / elasticsearch.md
Created March 5, 2021 16:18 — forked from dominicsayers/elasticsearch.md
Configuring ElasticSearch to use less memory

What I actually did

/etc/security/limits.conf

elasticsearch hard memlock 100000

/etc/default/elasticsearch

@tsolar
tsolar / .fehbg
Last active March 1, 2021 03:54
change wallpaper with feh
feh --no-fehbg --bg-fill $(find "${HOME}/Pictures/wallpapers/" -type f -name *.jpg | shuf -n 1)
{
"editor.insertSpaces": true,
"editor.tabSize": 2,
"files.trimTrailingWhitespace": true,
"files.insertFinalNewline": true,
"editor.formatOnType": false,
"editor.wordBasedSuggestions": false,
"editor.trimAutoWhitespace": false,
"gitlens.hovers.avatars": false,
"gitlens.hovers.currentLine.details": false,
@tsolar
tsolar / gist:9d93d2e20304c9c7e52b59ca7ffa200a
Last active September 13, 2020 17:28
postgresql create database
su - postgres
psql
CREATE ROLE rolename WITH LOGIN PASSWORD 'password';
CREATE DATABASE databasename OWNER rolename;
# working 2020-09-13
sudo -u postgres -i
psql
CREATE ROLE tom WITH LOGIN PASSWORD 'password';
@tsolar
tsolar / Vagrantfile
Created May 4, 2018 03:40
Vagrantfile to run rails projects
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
@tsolar
tsolar / .powerline-shell.json
Last active December 4, 2017 14:04
powershell config
{
"segments": [
"time",
"ruby_version",
"virtual_env",
"username",
"hostname",
"ssh",
"cwd",
"git",
@tsolar
tsolar / Postman.desktop
Created June 1, 2017 16:27 — forked from pierremonico/Postman.desktop
Install Postman
[Desktop Entry]
Encoding=UTF-8
Name=Postman
Exec=postman
Icon=/opt/Postman/resources/app/assets/icon.png
Terminal=false
Type=Application
Categories=Development;
@tsolar
tsolar / timezone_select.rb
Last active July 24, 2023 12:28
time zone select rails, with canonical name in value
form.select :timezone, ActiveSupport::TimeZone.all.map{|tz| [ "(GMT#{tz.formatted_offset}) #{tz.name}", tz.tzinfo.canonical_zone.name] }, {prompt: "Elija zona horaria"}, class: 'form-control'
@tsolar
tsolar / package_install_libreadline6_libreadline6-dev.log
Created December 7, 2016 03:15
rvm libreadline error debian sid
$ cat /home/tom/.rvm/log/1481080358_ruby-2.3.3/package_install_libreadline6_libreadline6-dev.log
[2016-12-07 00:12:48] requirements_debian_libs_install
requirements_debian_libs_install ()
{
__rvm_try_sudo apt-get --no-install-recommends --yes install "$@" || return $?
}
current path: /home/tom
GEM_HOME=/home/tom/.rvm/gems/ruby-2.2.2
GEM_PATH=/home/tom/.rvm/gems/ruby-2.2.2:/home/tom/.rvm/gems/ruby-2.2.2@global
PATH=/home/tom/.rvm/gems/ruby-2.2.2/bin:/home/tom/.rvm/gems/ruby-2.2.2@global/bin:/home/tom/.rvm/rubies/ruby-2.2.2/bin:/home/tom/.nvm/v0.10.32/bin:./node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/home/tom/opt/bin:/home/tom/.composer/vendor/bin:/home/tom/.rvm/bin:/home/tom/.rvm/bin:/home/tom/.rvm/bin:/home/tom/.rvm/bin
@tsolar
tsolar / .zshrc
Created June 11, 2016 04:21
config de zsh usando oh-my-zsh
# Path to your oh-my-zsh installation.
export ZSH=/home/tom/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
#ZSH_THEME="robbyrussell"
ZSH_THEME="amuse"