Skip to content

Instantly share code, notes, and snippets.

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

Adrian Valenzuela adrianvalenz

💭
working on Rails stuff
View GitHub Profile
@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
@adrianvalenz
adrianvalenz / tmux.md
Created October 22, 2021 09:33 — forked from andreyvit/tmux.md
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@adrianvalenz
adrianvalenz / ..dracula setup for vim, zsh, & tmux
Last active December 1, 2020 09:04
so dope...even tmux has the dracula color schemes.
so dope...even tmux has the dracula color schemes.