Skip to content

Instantly share code, notes, and snippets.

Features Sidekiq Sidekiq Pro good_job solid_queue
Scheduled Jobs 🟢 🟢 🟢 🟢
Batches 🔴 🟢 [1] 🟢 [1] ?
Reliability 🔴 🟢 [1] 🟢 [1] 🟢 [1]
Search in web ui 🔴 🟢 [1] 🟢 [1] 🟠
Worker Metrics 🔴 🟢 [1] 🔵 [1] [2] [3] ?
E
// source: https://jennamolby.com/how-to-use-cookies-to-capture-url-parameters/
(function(){
function getCookie(cname) {
var name = cname + "=";
var decodedCookie = decodeURIComponent(document.cookie);
var ca = decodedCookie.split(';');
for(var i = 0; i <ca.length; i++) {
var c = ca[i];
while (c.charAt(0) == ' ') {
c = c.substring(1);
https://jennamolby.com/how-to-use-cookies-to-capture-url-parameters/
let YOUR_DOMAIN = "YOUR_DOMAIN.TLD" // ex: scrapingbee.com
function getParameterByName(name) {
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
results = regex.exec(location.search);
return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
}
@dhh
dhh / Gemfile
Created June 24, 2020 22:23
HEY's Gemfile
ruby '2.7.1'
gem 'rails', github: 'rails/rails'
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data
# Action Text
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra'
gem 'okra', github: 'basecamp/okra'
# Drivers
@dhh
dhh / tracker_blocking.rb
Last active June 30, 2024 14:35
Current list of spy pixels named'n'shamed in HEY, as of April 23, 2020
module Entry::TrackerBlocking
extend ActiveSupport::Concern
included do
has_many :blocked_trackers
end
email_service_blockers = {
"ActiveCampaign" => /lt\.php(.*)?l\=open/,
"AWeber" => "openrate.aweber.com",
@aymericbeaumet
aymericbeaumet / delete-likes-from-twitter.md
Last active April 14, 2025 05:39
[Recipe] Delete all your likes/favorites from Twitter

Ever wanted to delete all your likes/favorites from Twitter but only found broken/expensive tools? You are in the right place.

  1. Go to: https://twitter.com/{username}/likes
  2. Open the console and run the following JavaScript code:
setInterval(() => {
  for (const d of document.querySelectorAll('div[data-testid="unlike"]')) {
    d.click()
 }
@miglen
miglen / news-feeds-eradicator-linkedin.user.js
Last active July 4, 2022 12:19
News Feed Eradicator for LinkedIn
// ==UserScript==
// @name News Feed Eradicator for LinkedIn
// @namespace http://miglen.com/
// @version 0.5
// @description News Feed Eradicator for LinkedIn
// @author Miglen Evlogiev ([email protected])
// @match https://www.linkedin.com/*
// @grant none
// @downloadURL https://gist.github.com/miglen/4f1bccf15b63944675d34149dff0bc3d/raw/news-feeds-eradicator-linkedin.user.js#.user.js
// @updateURL https://gist.github.com/miglen/4f1bccf15b63944675d34149dff0bc3d/raw/news-feeds-eradicator-linkedin.user.js#.user.js
@maxivak
maxivak / date_time_picker_rails.md
Last active March 7, 2022 19:36
Datetime picker in Rails app

Date time picker in Rails app

There are several options to make Date input in Rails application:

  • Default inputs from simple_form
  • HTML 5 date input
  • Text input with jQuery UI Date time picker
  • Other plugins for date input with Bootstrap 4
@skatkov
skatkov / wip_graphql_demo.rb
Created May 2, 2018 07:40 — forked from marckohlbrugge/wip_graphql_demo.rb
Ruby example of creating a todo and then completing it using wip.chat graphql.
# NOTE: Be sure to set the API key further down in the code!
require "net/http"
require "uri"
require "json"
class WIP
def initialize(api_key:)
@api_key = api_key
end
@kyptin
kyptin / steps.md
Last active October 16, 2023 06:22
Accessing a rails console in Google App Engine (flexible)

If you're running a Rails app in Google App Engine's flexible environment, it takes a bit of setup to get to a rails console attached to your deployed environment. I wanted to document the steps for my own reference and also as an aid to others.

  1. Open the Google App Engine -> instances section of the Google Cloud Platform (GCP) console.

  2. Select the "SSH" drop-down for a running instance. (Which instance? Both of my instances are in the same cluster, and both are running Rails, so it didn't matter for me. YMMV.) You have a choice about how to connect via ssh.

    1. Choose "Open in browser window" to open a web-based SSH session, which is convenient but potentially awkward.

    2. Choose "View gcloud command" to view and copy a gcloud command that you can use from a terminal, which lets you use your favorite terminal app but may require the extra steps of installing the gcloud command and authenticating the gcloud command with GCP.