Skip to content

Instantly share code, notes, and snippets.

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

Jaswinder Singh jaswinder97

🏠
Working from home
View GitHub Profile
@pantsel
pantsel / docker-compose.yml
Last active March 21, 2024 20:25
example docker-compose.yml for kong, postgres and konga
version: "3"
networks:
kong-net:
driver: bridge
services:
#######################################
# Postgres: The database used by Kong
@anil826
anil826 / upwork_tracker_free_time.rb
Last active April 1, 2016 06:55
Simple Script for switching terminal and tabs for UPWORK guys ;)
#!/usr/bin/env python
#To run this script in terminal first to install this dependancy: sudo apt-get install xdotool
#To make it excutable GoTo the file directory and run the command: chmod u+x upwork_tracker_free_time.rb
#Now you just need to run this file using form termial :~ ./upwork_tracker_free_time.rb
#Note: You need to specifiy every on which work space you want to swicth tab currently In code I am only swithching termial
#But you can also switch browser tab or sublim tabs subprocess.call("xdotool key ctrl+Tab" ,shell=True)
#Enjoy :)
import subprocess
import time
subprocess.call("xdotool key ctrl+alt+Up" ,shell=True)
@eparreno
eparreno / sidekiq_delete_jobs.md
Last active September 5, 2023 17:38
How to delete Sidekiq jobs in a Rails app using ActiveJobs

How to delete Sidekiq jobs in a Rails app using ActiveJobs

Sidekiq jobs can be enqueued or scheduled. Enqueued means that they are gonna be picked up as soon as possible, scheduled jobs will be enqueued at some specific time.

job_id and jid

When using ActiveJobs, Rails will return a job_id after sending the job to ActiveJobs

job = UserMailer.send_invite(params).deliver_later