Skip to content

Instantly share code, notes, and snippets.

@fbuys
fbuys / clear-sidekiq-jobs.sh
Created July 21, 2023 20:13 — forked from wbotelhos/clear-sidekiq-jobs.sh
Clear Sidekiq Jobs
require 'sidekiq/api'
# 1. Clear retry set
Sidekiq::RetrySet.new.clear
# 2. Clear scheduled jobs
Sidekiq::ScheduledSet.new.clear

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@fbuys
fbuys / html-skeleton-with-csp-aria.html
Created May 21, 2023 22:06 — forked from dfkaye/html-skeleton-with-csp-aria.html
Expanded version of Josh W. Comeau (2020), HTML Skeleton (adds CSP, ARIA, custom tag name)
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Josh W Comeau (2020), HTML Skeleton (starter for every web page) → https://joshwcomeau.com/snippets/html/html-skeleton -->
<!-- see also my HTML5 boilerplate gist → https://gist.github.com/dfkaye/1ed260cf8cf1990b13aaa272dab0bf97 -->
<title>Your Page Title</title>
@fbuys
fbuys / vim-keys-and-commands-cheatsheet.md
Last active July 27, 2021 18:45
Vim Essentials Cheatsheet

Buffers

A buffer is a file opened in memory.

Purpose Command
Go to buffer using ID or Name :buffer <id_or_name>
Go to next buffer :bnext or :bn
Go to previous buffer :bprevious or :bp
Go to first buffer :bfirst or :bf
Go to last buffer :bfirst or :bl
@fbuys
fbuys / active_record_to_yaml
Created July 1, 2020 15:28
Ruby code for iterating through a list of active record tables, it then saves the active records in yaml format.
TABLES_TO_SKIP = %w[ar_internal_metadata delayed_jobs schema_info schema_migrations].freeze
begin
ActiveRecord::Base.establish_connection
# For all tables uncomment the below
# ActiveRecord::Base.connection.tables.each do |table_name|
# To limit to specific tables uncomment below
['table_name'].each do |table_name|
next if TABLES_TO_SKIP.include?(table_name)
@fbuys
fbuys / keybase.md
Last active September 6, 2021 08:11

Keybase proof

I hereby claim:

To claim this, I am signing this object: