Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Jaswinder Singh jaswinder97

🏠
Working from home
View GitHub Profile
@pantsel
pantsel / docker-compose.yml
Last active Oct 17, 2021
example docker-compose.yml for kong, postgres and konga
View docker-compose.yml
version: "3"
networks:
kong-net:
driver: bridge
services:
#######################################
# Postgres: The database used by Kong
@anil826
anil826 / upwork_tracker_free_time.rb
Last active Apr 1, 2016
Simple Script for switching terminal and tabs for UPWORK guys ;)
View upwork_tracker_free_time.rb
#!/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 Sep 6, 2021
How to delete Sidekiq jobs in a Rails app using ActiveJobs
View sidekiq_delete_jobs.md

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