Skip to content

Instantly share code, notes, and snippets.

View akhildave's full-sized avatar
🏠
Working from home

Akhil Dave akhildave

🏠
Working from home
View GitHub Profile
@akhildave
akhildave / clear-sidekiq-jobs.sh
Created April 24, 2020 06:17 — 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
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
--
@akhildave
akhildave / gist:786342b179a627910ecc
Created March 4, 2015 05:51
question_type_methods.rb
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]
@akhildave
akhildave / xcode-6-app-icon-resize-terminal-commands
Created January 15, 2015 09:33
xcode 6 app icon resize terminal
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
#!/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