Skip to content

Instantly share code, notes, and snippets.

<%= 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">
gem 'sqlite3', '~> 1.4', '>= 1.4.1'
gem 'guard-rspec'
gem 'capybara'
gem 'rspec-sidekiq'
@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::Simple@2.03)
(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 Encode@2.21 Socket@2.016
openssl version
yum install gcc
cd /usr/src
# 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 / index.js
Created April 14, 2025 18:53
Code: Azure sms cognitive services + cloudflare worker + Turso = collect sms and save this into Turso
// src/templates/basic/index.js
import { createClient } from "@libsql/client/web";
var basic_default = {
async fetch(request, env) {
const { headers } = request;
const contentType = headers.get("Content-Type") || "";
if (request.method === "POST" && contentType.includes("application/json")) {
const client = createClient({ url: env.TURSO_URL, authToken: env.TURSO_AUTH_TOKEN });
const eventGridData = await request.json() ||{};