Skip to content

Instantly share code, notes, and snippets.

View Navdevl's full-sized avatar
☄️
11.11

Naveen Honest Raj Navdevl

☄️
11.11
View GitHub Profile
@Navdevl
Navdevl / deploy.sh
Created July 19, 2024 09:24
Deploying applications using Dockerfile (with nearly zero downtime)
#!/bin/bash
# Function to check container health
check_container_health() {
local container=$1
local max_retries=10
local retry_interval=5
for i in $(seq 1 $max_retries); do
if [ "$(docker inspect --format='{{.State.Health.Status}}' $container)" == "healthy" ]; then
@Navdevl
Navdevl / unfollow-instagram.js
Created April 13, 2020 11:15 — forked from leodutra/unfollow-instagram.js
Instagram - auto unfollow
// open "following" on web browser
async function main() {
const buttons = document.querySelectorAll('button')
for (let button of buttons) {
if (button.textContent.trim().toLowerCase() === 'seguindo') {
button.click()
await wait(5000)
const unfollowBtns = document.querySelectorAll('button')
for (let x of unfollowBtns) {
if (x.textContent.trim().toLowerCase() === 'deixar de seguir') {
{
"companyName": "DefaultCompany",
"productName": "Ambler",
"productVersion": "1.0",
"dataUrl": "https://virtual-silcton.s3.amazonaws.com/main-routes_fixed/Build/Silcton_Website_Builds_MainScenes_and_Pointing.data.unityweb",
"wasmCodeUrl": "https://virtual-silcton.s3.amazonaws.com/main-routes_fixed/Build/Silcton_Website_Builds_MainScenes_and_Pointing.wasm.code.unityweb",
"wasmFrameworkUrl": "https://virtual-silcton.s3.amazonaws.com/main-routes_fixed/Build/Silcton_Website_Builds_MainScenes_and_Pointing.wasm.framework.unityweb",
"graphicsAPI": ["WebGL 2.0","WebGL 1.0"],
"webglContextAttributes": {"preserveDrawingBuffer": false},
"splashScreenStyle": "Dark",
{
"Version":"2012-10-17",
"Id":"Policy1582650338510",
"Statement":[
{
"Sid":"Stmt1582650254771",
"Effect":"Allow",
"Principal":{
"AWS":"arn:aws:iam::866245651081:user/alex.baranov"
},

Keybase proof

I hereby claim:

  • I am navdevl on github.
  • I am navdevl (https://keybase.io/navdevl) on keybase.
  • I have a public key whose fingerprint is FC99 89E9 A12F 4181 B035 C78A 0C0B F97A 6A1B EBE2

To claim this, I am signing this object:

@Navdevl
Navdevl / .env_rails
Created June 29, 2018 06:23
.env for Rails Docker
COMPOSE_PROJECT_NAME=yourprojectname
RAILS_ENV=development|production
SECRET_KEY_BASE=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
REDIS_SIDEKIQ_URL=redis://redis:6379/0
REDIS_CABLE_URL=redis://redis:6379/1
# This should go to config/initializers/sidekiq.rb
# Follow this so that you can use the env file safely for dockerizing.
sidekiq_config = { url: ENV['REDIS_SIDEKIQ_URL'] }
Sidekiq.configure_server do |config|
config.redis = sidekiq_config
end
Sidekiq.configure_client do |config|
@Navdevl
Navdevl / todoist.py
Created May 8, 2018 14:01
Todoist BitBar
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# <bitbar.title>Todoist Today</bitbar.title>
# <bitbar.version>v1.0.0</bitbar.version>
# <bitbar.dependencies>python</bitbar.dependencies>
# <bitbar.author>Navdevl</bitbar.author>
import json
from todoist.api import TodoistAPI
@Navdevl
Navdevl / text2int.py
Created November 3, 2017 06:16
A way to convert word to number.
# Credits to https://stackoverflow.com/questions/493174/is-there-a-way-to-convert-number-words-to-integers#38760564
def text2int (textnum, numwords={}):
if not numwords:
units = [
"zero", "one", "two", "three", "four", "five", "six", "seven", "eight",
"nine", "ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen",
"sixteen", "seventeen", "eighteen", "nineteen",
]