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
require 'sidekiq/api' | |
# 1. Clear retry set | |
Sidekiq::RetrySet.new.clear | |
# 2. Clear scheduled jobs | |
Sidekiq::ScheduledSet.new.clear |
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
Find files more than 200MB | |
----- | |
sudo find / -type f -size +200M -exec ls -lh {} \; | |
---- | |
truncate file using below command | |
-- | |
truncate -s0 /var/www/FreshSchoolsApi/releases/20160824093323/log/production.log | |
-- |
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
SurveyorGui::Models::QuestionTypeMethods.module_eval do | |
def _process_answers_textbox(question, args) | |
is_exclusive = args[:is_exclusive] | |
other = args[:other] | |
is_comment = args[:comments] | |
omit_text = is_exclusive ? "\n"+args[:omit_text].to_s : "" | |
other_text = other ? "\n"+args[:other_text].to_s : "" | |
comments_text = is_comment ? "\n"+args[:comments_text].to_s : "" | |
answers_textbox = args[:answers_textbox] | |
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
mkdir -p myappicons | |
sips -Z 58 --out myappicons/iPhone-58x58@2x.png sourceIcon.png | |
sips -Z 87 --out myappicons/iPhone-87x87@3x.png sourceIcon.png | |
sips -Z 58 --out myappicons/iPhone-58x58@2x.png sourceIcon.png | |
sips -Z 80 --out myappicons/iPhone-80x80@2x.png sourceIcon.png | |
sips -Z 120 --out myappicons/iPhone-120x120@3x.png sourceIcon.png | |
sips -Z 120 --out myappicons/iPhone-120x120@2x.png sourceIcon.png |
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 | |
### BEGIN INIT INFO | |
# Provides: sidekiq beta | |
# Required-Start: $syslog $remote_fs | |
# Required-Stop: $syslog $remote_fs | |
# Should-Start: $local_fs | |
# Should-Stop: $local_fs | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: sidekiq beta - asynchronous rails |