
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
github-leetcode-component
Advanced tools
Component to generates GitHub and LeetCode calendar. Plus, the combination calendar for both.
github-leetcode-component is a react library to:
Here how GitHub Calendar, Leetcode Calendar, Combination Calendar look in order:

Different Sizes of Calendar:
Combination Calender (Large - default / wrong input)
GitHub Calendar (Medium)
LeetCode Calendar (Small)

Example of applying to :
My personal blog (Typescript / Next.js / Vercel)
Vite app (Typescript / Vite)
Next.js app (Typescript / Vite)
npm install github-leetcode-component
You will have to set up a server proxy. Here are guide and examples for vite and next.js.
npm install github-leetcode-component
Here is an example:
// vite.config.ts
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
server: {
proxy: {
"/github": {
target: "https://github.com",
changeOrigin: true,
rewrite: (path) => path.replace(/^\/github/, ""),
},
"/leetcode": {
target: "https://leetcode.com/graphql/",
changeOrigin: true,
rewrite: (path) => path.replace(/^\/leetcode/, ""),
},
},
},
});
import "./App.css";
import { CombinationCalendar, LeetCodeCalendar } from "github-leetcode-component";
function App() {
return (
<>
<CombinationCalendar
github_username="ggamsang812"
leetcode_username="ggamsang812"
size="small"
/>
<LeetCodeCalendar username="ggamsang812"/>
</>
);
}
export default App;
Project page of my personal blog
test next.js app repo
npm install github-leetcode-component
rewrites to the next.config.mjs (or next.config.js - whichever you have on your next.js project)Here is an example:
// next.config.mjs
/** @type {import('next').NextConfig} */
const nextConfig = {
async rewrites() {
return [
{
source: "/github/:path*",
destination: "https://github.com/:path*", // Proxy to Backend
},
{
source: "/leetcode/:path*",
destination: "https://leetcode.com/graphql/:path*", // Proxy to Backend
},
];
},
};
export default nextConfig;
// next.config.js
module.exports = {
async rewrites() {
return [
{
source: "/github/:path*",
destination: "https://github.com/:path*", // Proxy to Backend
},
{
source: "/leetcode/:path*",
destination: "https://leetcode.com/graphql/:path*", // Proxy to Backend
},
];
},
};
Here is an example:
// app/pages/Calendar.tsx
"use client";
import { GitHubCalendar, CombinationCalendar } from "github-leetcode-component";
export default function Calendar() {
return (
<div>
<GitHubCalendar username="ggamsang812" size="medium" />
<CombinationCalendar
github_username="ggamsang812"
leetcode_username="ggamsang812"
/>
</div>
);
}
// app/page.tsx
import Calendar from "./pages/Calendar";
export default function Home() {
return (
<div>
<Calendar />
</div>
);
}
Offers two modes of operation:
/**
* Generates GitHub Contribution Calendar
* @param {string} github_username - GitHub username
* @param {string} leetcode_username - LeetCode username
* @param {string} year - Optional param for year of the calendar
* @param {string} size - Optional param for size of the calendar
* @returns {jsx} -
*/
import { CombinationCalendar } from "github-leetcode-component";
<CombinationCalendar github_username="ggamsang812" leetcode_username="ggamsang812" />
<CombinationCalendar github_username="ggamsang812" leetcode_username="ggamsang812" size="small"/>
example:

Offers two modes of operation:
/**
* Generates GitHub Contribution Calendar
* @param {string} username - GitHub username
* @param {string} year - Optional param for year of the calendar
* @param {string} size - Optional param for size of the calendar
* @returns {jsx} -
*/
import { GitHubCalendar } from "github-leetcode-component";
<GitHubCalendar username="ggamsang812" />
<GitHubCalendar username="ggamsang812" year="2024" />
<GitHubCalendar username="ggamsang812" size="medium" />
example:

Offers two modes of operation:
/**
* Generates LeetCode Submissions Calendar
* @param {string} username - LeetCode username
* @param {string} year - Optional param for year of the calendar
* @param {string} size - Optional param for size of the calendar
* @returns {jsx} -
*/
import { LeetCodeCalendar } from "github-leetcode-component";
<LeetCodeCalendar username="ggamsang812" />
<LeetCodeCalendar username="ggamsang812" year="2024" />
<LeetCodeCalendar username="ggamsang812" size="MeDiUm" />
example:

Performs an HTTP request to fetch user data, then converts the fetched data into a stringified HTML format and returns it. Offers two modes of operation:
/**
* Fetch GitHub user data
* @param {string} username - LeetCode username
* @param {string} year - Optional param for specific year data
* @returns {string} - stringified fetched GitHub data
*/
import { GetGitHubData } from "github-leetcode-component";
<GetGitHubData username="ggamsang812" />
<GetGitHubData username="ggamsang812" year="2024" />
example:

Performs an HTTP request with GraphQL query to fetch user data, then converts the fetched data into a stringified HTML format and returns it. Offers two modes of operation:
/**
* Fetch LeetCode user data
* @param {string} username - LeetCode username
* @param {string} year - Optional param for specific year data
* @returns {string} - stringified fetched Leetcode data
*/
import { GetLeetCodeData } from "github-leetcode-component";
<GetLeetCodeData username="ggamsang812" />
<GetLeetCodeData username="ggamsang812" year="2024" />
example:

FAQs
Component to generates GitHub and LeetCode calendar. Plus, the combination calendar for both.
We found that github-leetcode-component demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.