Skip to content

Instantly share code, notes, and snippets.

View carlitos's full-sized avatar

Carlos Moisés Castro Jiménez carlitos

View GitHub Profile
@carlitos
carlitos / render.yml
Created April 12, 2024 20:29
Render Blueprint
databases:
- name: app
databaseName: appdb
user: app
plan: starter
services:
- type: redis
name: redis
ipAllowList: []
@carlitos
carlitos / error.log
Created October 17, 2022 18:13
Error Log Decidim
2022/10/17 06:20:19 [info] 2277891#2277891: Using 32768KiB of shared memory for nchan in /etc/nginx/nginx.conf:64
2022/10/17 06:20:20 [notice] 2277897#2277897: signal process started
[ N 2022-10-17 06:20:20.4799 2277901/T1 age/Wat/WatchdogMain.cpp:1373 ]: Starting Passenger watchdog...
[ N 2022-10-17 06:20:20.5540 2277904/T1 age/Cor/CoreMain.cpp:1340 ]: Starting Passenger core...
[ N 2022-10-17 06:20:20.5543 2277904/T1 age/Cor/CoreMain.cpp:256 ]: Passenger core running in multi-application mode.
[ N 2022-10-17 06:20:20.5714 2277904/T1 age/Cor/CoreMain.cpp:1015 ]: Passenger core online, PID 2277904
[ E 2022-10-17 06:20:22.9822 2277904/T5 age/Cor/SecurityUpdateChecker.h:521 ]: A security update is available for your version (6.0.12) of Phusion Passenger(R). We strongly recommend upgrading to version 6.0.14.
[ E 2022-10-17 06:20:22.9822 2277904/T5 age/Cor/SecurityUpdateChecker.h:526 ]: Additional security update check information:
- [Fixed in 6.0.14] [CVE-2018-25032] zlib before 1.2.12 allows memory corruption w
@carlitos
carlitos / palindrome.rb
Last active July 30, 2021 15:31
Palindrome word without using reverse of ruby method
def reverse string
split_word = string.split(//)
reversed_word = []
string.length.times do
reversed_word << split_word.pop
end
@carlitos
carlitos / snake.rb
Created July 30, 2021 05:30
snake.rb
require 'ruby2d'
set background: 'navy'
#width = 640 / 20 =32
#height = 480 / 2- = 24
GRID_SIZE = 20
class Snake
def initialize
<div id="home" class="">
<% if @transmision == true %>
<div class="sesion-activa" id="home-main-banner">
<div class="center-align">
begin
request_uri = 'http://200.36.54.235/home/semanaactual'
buffer = open(request_uri).read
result = JSON.parse(buffer)
@hash_semana_actual = result
rescue StandardError => e
@hash_semana_actual = []
@error_semana_actual = e
end
<div class="carta z-depth-4 calendar-home">
<% (@[email protected]_of_week).each do |dia| %>
<div class="row">
<h5><%= l(dia, format: "%A, %d de %B") %></h5>
<% @hash_semana_actual.each do |event| %>
<% if d = Date.parse(event["start_at"]).day == dia.day %>
<div class="row">
<div class="col s4 borde-amarillo">
<div class="row no-margin">
<p>
@carlitos
carlitos / show.html.haml
Created April 10, 2018 01:28
show post entries
%div.modal-header
%button.close{ type: "button", aria_hidden: "true", data: { dismiss: "modal" } }= '&times;'.html_safe
%h4.modal-title= "#{@post.title}"
%div.modal-body
%ul.list-group
%li.list-group-item
= link_to 'Edit', [:edit, :admin, @post], class: 'btn btn-primary btn-block'
- %w(id title subtitle publication_date url ln_id publish_at published).each do |meth|
%li.list-group-item
%strong= "#{meth.titleize}:"
@carlitos
carlitos / Gemfile
Created July 31, 2017 22:44
Livechat gs project
source 'https://rubygems.org'
git_source(:github) do |repo_name|
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
"https://github.com/#{repo_name}.git"
end
gem 'rails', '~> 5.0.2'
gem 'sqlite3'
gem 'puma', '~> 3.0'
@carlitos
carlitos / default unicorn
Created April 22, 2016 18:59
Default Unicorn
# Change paramentres below to appropriate values and set CONFIGURED to yes.
CONFIGURED=yes
# Default timeout until child process is killed during server upgrade,
# it has *no* relation to option "timeout" in server's config.rb.
TIMEOUT=60
# Path to your web application, sh'ld be also set in server's config.rb,
# option "working_directory". Rack's config.ru is located here.
APP_ROOT=/home/rails/allmobiletest