This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# FOR BUSY JOBS | |
# take the process_id from the /busy page in sidekiq and kill the longest running one. | |
workers = Sidekiq::Workers.new | |
workers.each do |process_id, thread_id, work| | |
process = Sidekiq::Process.new('identity' => process_id) | |
process.stop! if process_id == 'integration.3:4:71d1d7f4ef5a' | |
end | |
# FOR SCHEDULED JOBS | |
# you need to know the jid to make this happen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function transitionIn (el, show = () => {}) { | |
const attrs = getXAttrs(el, 'transition') | |
// If any transition attrs. | |
if (attrs.filter(attr => ['enter', 'enter-start', 'enter-end'].includes(attr.value)).length > 0) { | |
transitionClassesIn(el, attrs, show) | |
} else { | |
// If not, just show that damn thing. | |
show() | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package logging | |
import ( | |
"github.com/rs/zerolog" | |
"github.com/rs/zerolog/log" | |
"gopkg.in/natefinch/lumberjack.v2" | |
"os" | |
"path" | |
"io" | |
) |
- Website: https://stimulusjs.org/
- GitHub repo: https://github.com/stimulusjs/stimulus
- Handbook: https://stimulusjs.org/handbook/introduction
- Discourse: https://discourse.stimulusjs.org/
initialize
: once, when the controller is first instantiatedconnect
: anytime the controller is connected to the DOM
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Daniel Verner | |
# CarrotPlant LLC | |
# 2011 | |
# Backup each mysql databases into a different file, rather than one big file | |
# Optionally files can be gzipped (dbname.gz) | |
# | |
# Usage: dump_all_databases [ -u username -o output_dir -z ] | |
# | |
# -u username to connect mysql server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# lib/tasks/db.rake | |
namespace :db do | |
desc "Dumps the database to db/APP_NAME.dump" | |
task :dump => :environment do | |
cmd = nil | |
with_config do |app, host, db, user| | |
cmd = "pg_dump --host #{host} --username #{user} --verbose --clean --no-owner --no-acl --format=c #{db} > #{Rails.root}/db/#{app}.dump" | |
end | |
puts cmd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# rev4 - changes suggested by KownBash https://www.reddit.com/r/bash/comments/5cxfqw/i_wrote_a_simple_video_to_gif_bash_script_thought/da19gjz/ | |
# Usage function, displays valid arguments | |
usage() { echo "Usage: $0 [-f <fps, defaults to 15>] [-w <width, defaults to 480] inputfile" 1>&2; exit 1; } | |
# Default variables | |
fps=15 | |
width=480 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
NewerOlder