Skip to content

Instantly share code, notes, and snippets.

View soham2008xyz's full-sized avatar
👨‍💻
Sprint-mode ON!

Soham Banerjee soham2008xyz

👨‍💻
Sprint-mode ON!
View GitHub Profile
@soham2008xyz
soham2008xyz / aws-blog-codepipeline-third-party-git-build-status.yml
Created July 10, 2024 10:00
Tracking the AWS CodePipeline build status from the third-party Git repository
AWSTemplateFormatVersion: '2010-09-09'
Description: Lambda for Pipeline Integrations.
Parameters:
IntegrationType:
Type: String
AllowedValues:
- "Bitbucket"
- "GitHub"
Description: Enter Bitbucket or GitHub
IntegrationUser:
@soham2008xyz
soham2008xyz / iTerm2-Ollama-Integration.md
Last active January 14, 2025 09:50
iTerm2 Ollama Integration

iTerm2 Ollama Integration

A guide on using Ollama as the OpenAI API provider for inline completions in iTerm2.

Configuration

  • API URL: http://127.0.0.1:11434/v1/completions
  • Model: mistral
  • Tokens: 4000
  • Use legacy completions API: true
@soham2008xyz
soham2008xyz / App.jsx
Last active July 2, 2024 14:13
YouTube video iframe player with start/stop event handling in React
import YouTubeVideo from './YouTubeVideo';
function App() {
return (
<div className="App">
<YouTubeVideo
videoId="dQw4w9WgXcQ"
width={640}
height={360}
title="Rick Astley - Never Gonna Give You Up (Official Music Video)"
@soham2008xyz
soham2008xyz / CheckAndRestartPhpFpm.py
Last active July 2, 2024 07:05
AWS Lambda function to check if PHP-FPM is running and restart it, if not running
import boto3
import os
import logging
import time
# Setup logging
logger = logging.getLogger()
logger.setLevel(logging.INFO)
elasticbeanstalk = boto3.client('elasticbeanstalk')
@soham2008xyz
soham2008xyz / mysql-8-grant-privileges.sql
Created April 22, 2024 14:52
Grant all privileges to root user (on MySQL 8)
CREATE USER 'root'@'%' IDENTIFIED BY 'secret';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;
FLUSH PRIVILEGES;
@soham2008xyz
soham2008xyz / dsa-learning-roadmap.md
Created January 6, 2024 11:25
Data Structures and Algorithms Learning Roadmap

Data Structures and Algorithms Learning Roadmap

Here's a comprehensive learning roadmap for a developer on LeetCode who wants to improve their understanding and skills in Data Structures & Algorithms:

  1. Start with the basics: Before delving into complex algorithms, make sure you have a strong grasp of basic data structures like arrays, linked lists, stacks, and queues. This foundation will help you understand more advanced concepts later on. You can find plenty of resources online to learn about these topics, including tutorials and videos.
  2. Algorithmic thinking: Learn how to approach problems algorithmically by breaking them down into smaller steps and identifying patterns. Practice solving simple problems using basic data structures, then gradually move on to more complex ones. This skill will be invaluable when tackling LeetCode problems.
  3. Practice, practice, practice: The key to mastering algorithms is practice. Start by working through easy problems on LeetCode and gradually increase the diff
@soham2008xyz
soham2008xyz / leetcode-problem-statements.md
Created January 6, 2024 11:24
LeetCode Problem Statements
@soham2008xyz
soham2008xyz / autoexec.cfg
Last active September 10, 2024 04:08
CS2 autoexec & practice config
// Jump Throw (NOT WORKING)
// alias "+throw" "-attack;-attack2"
// bind "space" "+jump;+throw"
// Run Throw (NOT WORKING)
// alias "+walkjumpthrow" "+forward;+jump"
// alias "-walkjumpthrow" "-jump;-forward"
// bind "n" "+walkjumpthrow;+throw"
// New Jump Throw + Run Throw