Skip to content

Instantly share code, notes, and snippets.

View nikgoy's full-sized avatar
💭
Halleluyah!

Nikhil Goyal nikgoy

💭
Halleluyah!
  • Console
  • Delhi, India
View GitHub Profile
@nikgoy
nikgoy / clear-sidekiq-jobs.sh
Created February 10, 2022 17:24 — 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
@nikgoy
nikgoy / YoutubeDownloader.md
Created September 5, 2021 21:52 — forked from sheharyarn/YoutubeDownloader.md
Download Videos from Youtube in (Ruby || PHP)

Youtube Downloaders

Download Youtube Videos using Ruby or PHP

Just copy the appropriate script, provide the video_id and run. It will list download links for different qualities and streams.

:P

// remove duplicates
crunch("ddaaiillyy ddoouubbllee"); // "daily double"
crunch("4444abcabccba"); // "4abcabcba"
crunch("ggggggggggggggg"); // "g"
crunch("a"); // "a"
crunch(""); // ""
function crunch(string) {
let letters = string.split("");
@nikgoy
nikgoy / gist:ae1d0e28534d419b5f3325c3ad1de152
Created April 19, 2020 08:43
LS - General Approach to Solve the problem
Small Code Challenge Problems
- 20 - 45 minutes
- typical solutions: 10-40 LOC
- used extensively in interviews for a reason
- mastery on a language
- logic / reasoning
- communications
- not a skill that you "acquire and file away", but needs a lot of practice
Understand the Problem
<?php
/*
Template Name: Print Processing Orders :)
*/
if (!is_user_logged_in() || !current_user_can('manage_options')) wp_die('This page is private.');
?>
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />