Skip to content

Instantly share code, notes, and snippets.

# Add this content on: "/etc/yum.repos.d/CentOS-Base.repo"
#---- Packages previously released as 4.3, and its updates
[base]
name=CentOS-4.3 - Base
baseurl=http://vault.centos.org/4.3/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-4
enabled=1
[updates]
@LuisErnestoZamb
LuisErnestoZamb / gist:5616d30cc137d9c8a40072c3de0e9bc2
Last active July 27, 2020 03:57
How to hack a Centos 4 machine to get a recent version of OpenSSL in order to execute AWS SQS through perl (Amazon::SQS::[email protected])
(echo o conf prerequisites_policy follow;echo o conf commit)|cpan
wget http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-4
rpm --import http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-4
yum install -y gcc perl-Digest-SHA1 perl-Digest-HMAC perl-Net-SSLeay perl-libwww-perl perl-Crypt-SSLeay openssl-perl openssl-devel system-config-date
cpan App::cpanminus
cpanm [email protected] [email protected]
openssl version
yum install gcc
cd /usr/src
gem 'sqlite3', '~> 1.4', '>= 1.4.1'
gem 'guard-rspec'
gem 'capybara'
gem 'rspec-sidekiq'
<%= search_form_for @q.present? ? @q : Requesting.ransack() do |f| %>
<div class="field">
<%= f.search_field :guid_cont, class: "form-control", placeholder: "Anything..." %>
</div>
<div class="field">
</div>
<div class="field">
@LuisErnestoZamb
LuisErnestoZamb / docker-compose-test.yml
Created November 16, 2018 16:42
Adding TDD on rails + docker
version: '2'
services:
webtest:
build:
context: .
dockerfile: doc/docker-conf/web/Dockerfile-test
volumes:
- .:/usr/src/app
command: bash -c "bundle check || bundle install; rm -f /usr/src/app/tmp/pids/server.pid ; rails s -p 3000 -b 0.0.0.0"
environment:
default: &default
adapter: <%= ENV["DB_ADAPTER"] || "mysql2" %>
encoding: utf8
url: <%= ENV["DATABASE_URL"] %>
pool: <%= ENV["DB_POOL"] || 5 %>
checkout_timeout: <%= ENV["DB_TIMEOUT"] || 5 %>
reconnect: true
development:
<<: *default
@LuisErnestoZamb
LuisErnestoZamb / 2017-11-29_15-08-33.jpg
Last active October 30, 2023 13:30
How setting up mysql as localhost and using this outside docker on Mac OS (accessing localhost mysql from docker) - The missing guide
2017-11-29_15-08-33.jpg
@LuisErnestoZamb
LuisErnestoZamb / gist:f18ed31e415de96b693b3e4ff2ed8db0
Last active November 15, 2018 17:46
Enable shared network on centos 6.4
ifup eth0
vi /etc/sysconfig/network-scripts/ifcfg-eth0
---------------
DEVICE=eth0
TYPE=Ethernet
ONBOOT=yes
BOOTPROTO=dhcp
IPV4_FAILURE_FATAL=yes
---------------
Seleccionar el commit con el sourcetree.
git reset HEAD^ --hard
git push origin -f HEAD:develop
[mysqld]
#bulk_insert_buffer_size=512M
# Allow external connections:
bind-address = 0.0.0.0
# only localhost
bind-address = 127.0.0.1
# or on mysql cli:
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;