Skip to content

Instantly share code, notes, and snippets.

View codekunoichi's full-sized avatar
🎯
Focusing

Rumpa Giri codekunoichi

🎯
Focusing
View GitHub Profile
@codekunoichi
codekunoichi / redshift_sproc_tip.md
Last active November 9, 2024 13:46
Stored procedure in Amazon Redshift to dynamically use date ranges from a table, run a query, and export results to S3 on a schedule.

To create a solution that dynamically uses date ranges from another table and schedules the execution, you can use an Amazon Redshift stored procedure. This stored procedure can retrieve the date range from the specified table, then use it to execute your query.

Here’s how you can set it up:

  • Create the Stored Procedure to retrieve dates from another table and execute the main query.
  • Schedule the Stored Procedure using Redshift Query Editor v2 or Amazon EventBridge.

Step 1: Create the Stored Procedure

Here’s an example of how to create a stored procedure that retrieves start and end dates from a table, then uses those dates in a query.

@codekunoichi
codekunoichi / work-with-multiple-github-accounts.md
Last active November 11, 2022 11:53 — forked from rahularity/work-with-multiple-github-accounts.md
How To Work With Multiple Github Accounts on your PC

How To Work With Multiple Github Accounts on a M1-MacBook Apple 2022

Let suppose I have two github accounts, https://github.com/rahul-office and https://github.com/rahul-personal. Now i want to setup my mac to easily talk to both the github accounts.

NOTE: This logic can be extended to more than two accounts also. :)

Original Author

https://gist.github.com/rahularity/86da20fe3858e6b311de068201d279e3

Modifications

@codekunoichi
codekunoichi / LearningApacheKafka.md
Last active February 12, 2022 16:48
Apache Kafka Notes

Learning Apache Kafka

  • Following are my notes while learning Apache Kafka from this LinkedIn Learning Tutorials
  • https://www.linkedin.com/learning/learn-apache-kafka-for-beginners
  • Note, few things need to update, as following the hands on guide, changed, all of those noted in here as I navigated through the course.
  • Start Date = 02/07/2022
  • End Date = TBD
  • Learning Project = TBD

My local environment

  • I am on macOS BigSur Version 11.6
# Using these pry gems
# Essentials
# gem "pry"
# gem "pry-rails"
# gem "pry-byebug"
# gem "pry-doc"
# gem "pry-rescue"
# === EDITOR ===
# Pry.editor = 'vi'
@codekunoichi
codekunoichi / .bash_profile
Created April 17, 2021 11:08 — forked from natelandau/.bash_profile
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
@codekunoichi
codekunoichi / ReadMeExercism.md
Last active December 15, 2020 00:36
How to practice Ruby coding daily to get proficient?

Overview

I wanted to explore how can I do some deliberate practice of my newly learnt programming lanugage - Ruby. Looks like https://exercism.io/my/tracks can help fullfilling that desire :)

Installation Steps Followed

Adding the steps I did for history purposes, to not forget how I got started. By the time you are reading, the steps may bee different. So please follow the websiite instruction. They seem to be very intuitive and easy to follow.

  • Install the toolkit for practicing and submitting your solution to the practice problems
@codekunoichi
codekunoichi / LearningGit.md
Last active December 10, 2020 16:41
Git Overview and Basic Commands I used frequently

Git Overview

  • Git is a distributed version control system(VCS). Its also known as Source Code Management (SCM). VCS and SCM are the same meaning terminology.
  • A way to snapshot your code changes as you make them locally.
  • After each commit you make, you begin to create a chronological changes to your code base. Hence reverting to a particular point in time is easier.
  • The full repository resides locally on your system. You can commit to your local repositoory often. Without the dependence on a remote server.
  • Using GitHub like system, once you clone a repository, you have identical copy of the remote repository locally. You work on local, committing often to local repository.
  • You can push/pull to synchronize the remote and local repository.

Best Rreference

The Rands Test: 11 Possible Points

Like the Joel Test, the point of the Rands Test is not the absolute score, though the score provides good directional information. If you got an 11, I’d say you’re in a rare group of people who have a clear picture of their company and where they fit in. Between 8 and 10, you are likely troublingly deficient in either communications, strategy, or your development—it depends where the points are missing. Less than 8 and I think you’ve got a couple of problems.

  • DO YOU HAVE A CONSISTENT ONE-ON-ONE WHERE YOU TALK ABOUT TOPICS OTHER THAN STATUS? (+1)
  • DO YOU HAVE A CONSISTENT TEAM MEETING? (+1)
  • ARE HANDWRITTEN STATUS REPORTS DELIVERED WEEKLY VIA E-MAIL? (-1)
  • ARE YOU COMFORTABLE SAYING “NO” TO YOUR BOSS? (+1)
  • CAN YOU EXPLAIN THE STRATEGY OF YOUR COMPANY TO A STRANGER? (+1)
  • CAN YOU TELL ME WITH SOME ACCURACY THE STATE OF THE BUSINESS ? (OR COULD YOU GO TO SOMEONE SOMEWHERE AND FIGURE IT OUT RIGHT NOW?) (+1)

The Joel Test: 12 Steps to Better Code

Answer the following question for your team a simple yes/no. For each yes, you score 1 point. According to Joel: A score of 12 is perfect, 11 is tolerable, but 10 or lower and you’ve got serious problems.

  • Do you use source control?
  • Can you make a build in one step?
  • Do you make daily builds?
  • Do you have a bug database?
  • Do you fix bugs before writing new code?