Skip to content

Instantly share code, notes, and snippets.

View adrianvalenz's full-sized avatar
💭
working on Ruby stuff

Adrian Valenzuela adrianvalenz

💭
working on Ruby stuff
View GitHub Profile
@adrianvalenz
adrianvalenz / gist:f374e60b12dfdd50da1c3ebb0e4aef24
Created October 5, 2025 01:26
decay color scheme wezterm
-- Decay color scheme
config.colors = {
-- Terminal ANSI colors
ansi = {
"#1c252c", -- black
"#e05f65", -- red
"#78dba9", -- green
"#f1cf8a", -- yellow
"#70a5eb", -- blue
"#c68aee", -- magenta
# Decay Theme for Ghostty
# Based on the Wezterm Decay theme
# Standard colors (0-15)
palette = 0=#1c252c
palette = 1=#e05f65
palette = 2=#78dba9
palette = 3=#f1cf8a
palette = 4=#70a5eb
palette = 5=#c68aee
@adrianvalenz
adrianvalenz / one_dark
Last active February 21, 2025 18:11
one dark, nord, onenord for alacritty
[colors.normal]
black = '#211828' # (Black)
red = '#e06c76' # (Red)
green = '#98c379' # (Green)
yellow = '#e5c07b' # (Yellow)
blue = '#61afef' # (Blue)
magenta = '#c678dd' # (Magenta)
cyan = '#56b6c2' # (Cyan)
white = '#abb2bf' # (White)
@adrianvalenz
adrianvalenz / solarized-osaka.tmux
Last active November 1, 2024 05:30
solarized osaka tmux theme
# kanablack='#1f1f28'
# # # Dopeness
# set -g status-bg $kanablack
# set -g status-fg $kanablack
# set -g status-style fg=$kanablack,bg=default
#
# set -g status-left-length 50
# set -g status-left "#[fg=green]#[bg=$kanablack]#[fg=$kanablack]#[bg=green]△#[fg=green]#[bg=$kanablack] #S#[fg=$kanablack]#[bg=$kanablack] "
# set -g status-right "#[bg=default] #[fg=$kanablack]y#[fg=green]#[bg=$kanablack]%a %d %b #[fg=$kanablack]#[bg=green]#[fg=$kanablack]%R#[fg=green]#[bg=$kanablack]"
#
# Ristretto
rr_bg="#2c2525"
rr_bg_1="#403838"
rr_bg_2="#5b5353"
rr_bg_3="#1a1515"
rr_fg="#fff8f9"
rr_fg_2="#72696a"
rr_fg_2="#948a8b"
rr_fg_2="#b5a9aa"
rr_fg_4="#fff1f3"
@adrianvalenz
adrianvalenz / search.rake
Created May 1, 2024 00:01
rake task for Melisearch
namespace :search do
# bundle exec rake search:index_all --trace
task reindex_all: :environment do
klasses = [Listing User Post]
klasses.each do |klass|
klass.reindex!
end
puts "Reindexed all classes"
end
@adrianvalenz
adrianvalenz / .tmux.conf
Last active October 21, 2023 02:02
tmux conf with color schemes kanagawa, iceberg, rosepine configs
# set -g default-terminal "screen-256color"
set -g default-terminal "xterm-256color"
set -g prefix C-f
unbind C-b
bind-key C-a send-prefix
unbind r
bind r source-file ~/.tmux.conf
# frozen_string_literal: true
require 'pry'
a = [
# "1\nJubil[A]ee, jubilee,\nJubilee, jubilee,\nPraise God for the jubi[E]lee!\nWords of grace, words of grace,\nWords of grace, words of grace!\nTime ac[E7]cept'ble, the year of jubil[A]ee.\nLost possession recovered,\n[A7]From all bondage set f[D]ree,\n[E]In God's house reu[A]nited—\nOur [D]Lord proclaims the j[E7]ubil[A]ee!\n\n2\nFather's house, Father's house,\nFather's house, Father's house,\nReturned to the Father's house,\nGod did run, God did run,\nGod did run, God did run,\nFell on our neck and kissed us tenderly.\nIn Christ clothed and accepted,\nNo more “pigs” food for me!\nFattened calf now enjoying—\nOur God proclaims the jubilee!\n\n3\nJubilee, jubilee,\nJubilee, jubilee,\nGospel of the jubilee!\nVessels we, vessels we,\nVessels we, vessels we,\nChosen vessels, receiving His mercy.\nPoor, blind, empty, no longer,\nGlorious riches have we!\nTo all th' poor and afflicted—\nWe now proclaim the jubilee!",
# Psa. 126:1-6\n\n1\nWhen the [D]Lord tur
class SourdoughFormBuilder < ActionView::Helpers::FormBuilder
def check_box(attribute, options={})
super(attribute, options.reverse_merge(class: "check-box-styles"))
end
def date_field(attribute, options={})
super(attribute, options.reverse_merge(class: "date-field-styles"))
end
def datetime_field(attribute, options={})
class Conversation < ActiveRecord::Base
enum status: [:active, :archived], _suffix: true
enum comments_status: [:active, :inactive], _prefix: :comments
end
conversation.active_status!
conversation.archived_status? # => false
conversation.comments_inactive!
conversation.comments_active? # => false