Skip to content

Instantly share code, notes, and snippets.

View khairulcs's full-sized avatar
🎯
Focusing

Khairul Azwan khairulcs

🎯
Focusing
View GitHub Profile
@khairulcs
khairulcs / gist:075a90f7f6497c5b693029cf6f9e23da
Created March 2, 2020 04:06 — forked from pitch-gist/gist:2999707
HTML: Simple Maintenance Page
<!doctype html>
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>
@khairulcs
khairulcs / clear-sidekiq-jobs.md
Last active May 25, 2021 13:23 — forked from wbotelhos/clear-sidekiq-jobs.sh
Clear Sidekiq Jobs

1. Clear retry set

Sidekiq::RetrySet.new.clear

1.1 Retry all

Sidekiq::RetrySet.new.retry_all

2. Clear scheduled jobs

Sidekiq::ScheduledSet.new.clear

3. Clear 'Processed' and 'Failed' jobs

Sidekiq::Stats.new.reset

4. Clear 'Dead' jobs statistics

Sidekiq::DeadSet.new.clear

@khairulcs
khairulcs / readme.md
Last active December 31, 2020 04:23 — forked from vortizhe/gist:f1bc1391c55d644cd2fa
Add sidekiq as a service in Ubuntu 20.04

STEPS

vim /etc/init.d/sidekiq

Copy and paste the code below and change appropriately Save and exit (ESC + :wq)

sudo update-rc.d sidekiq defaults
@khairulcs
khairulcs / install_ffmpeg_ubuntu.sh
Created April 23, 2021 05:34 — forked from xdamman/install_ffmpeg_ubuntu.sh
Install latest ffmpeg on ubuntu 12.04 or 14.04
#!/bin/bash
# Bash script to install latest version of ffmpeg and its dependencies on Ubuntu 12.04 or 14.04
# Inspired from https://gist.github.com/faleev/3435377
# Remove any existing packages:
sudo apt-get -y remove ffmpeg x264 libav-tools libvpx-dev libx264-dev
# Get the dependencies (Ubuntu Server or headless users):
sudo apt-get update
@khairulcs
khairulcs / rails http status codes
Created August 22, 2021 14:03 — forked from mlanett/rails http status codes
HTTP status code symbols for Rails
HTTP status code symbols for Rails
Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings.
Status Code Symbol
1xx Informational
100 :continue
101 :switching_protocols
102 :processing