Skip to content

Instantly share code, notes, and snippets.

View rkallensee's full-sized avatar
👋
Hi!

Raphael Kallensee rkallensee

👋
Hi!
View GitHub Profile
@rkallensee
rkallensee / gist:f0e617a3e349ad146cc7d3274e7ad445
Created March 20, 2024 15:32
Move Sidekiq scheduled jobs to the queue
# To be executed in the Rails console
scheduled_set = Sidekiq::ScheduledSet.new
scheduled_set.each do |job|
Sidekiq::Client.push(job.item)
puts "Moved job from ScheduledSet to #{job.queue}: #{job.args.first['job_class']} with args #{job.args.first['arguments']}"
job.delete
end
@rkallensee
rkallensee / Gemfile
Last active April 11, 2024 01:59
Script to convert datetimes in an icalendar ics file to local time
source 'https://rubygems.org'
gem 'icalendar'
gem 'activesupport'
# gem 'pry'
@rkallensee
rkallensee / gem_licenses_to_csv.rb
Last active May 10, 2019 07:59
Write all Ruby gem dependencies with their licenses into a CSV file
require 'csv'
csv_path = Rails.root.join("#{Rails.application.class.parent.name.underscore.dasherize}_licenses.csv")
CSV.open(csv_path, 'wb') do |csv|
csv << ['Gem', 'Licenses']
Gem.loaded_specs.each do |gem_name, spec|
csv << [gem_name, spec.licenses.join(', ')]
end
@rkallensee
rkallensee / github_issues_to_csv.rb
Last active April 30, 2024 11:48 — forked from tkarpinski/github_issues_to_csv.rb
Export Github issues to CSV grouped by Milestone
# original source: https://gist.github.com/tkarpinski/2369729
require 'octokit'
require 'csv'
require 'date'
# Github access token to access the project
# Create one at https://github.com/settings/tokens
ACCESS_TOKEN="GITHUB_ACCESS_TOKEN"