Skip to content

Instantly share code, notes, and snippets.

View eladcandroid's full-sized avatar

Elad Cohen eladcandroid

  • LLM + MCP = ❤️ | GoCode Founder
  • Israel
View GitHub Profile
@eladcandroid
eladcandroid / service-locator-pattern.ts
Created September 18, 2025 14:46
Angular Service Locator Pattern Example - Dynamic service resolution with plugin system and payment providers
// Service Locator Pattern Example - Dynamic Service Resolution
import { Injectable, Injector, Type } from '@angular/core';
/**
* Service Locator Pattern
* Note: This pattern is sometimes considered an anti-pattern because it creates
* hidden dependencies. Use it sparingly and prefer Angular's DI when possible.
* Good use cases: Plugin systems, dynamic service loading, runtime service selection
*/
@eladcandroid
eladcandroid / singleton-pattern.ts
Created September 18, 2025 14:44
Angular Singleton Pattern Example - Configuration Service and Logger Service with single instance guarantee
// Singleton Pattern Example - Configuration and Logger Services
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { APP_INITIALIZER } from '@angular/core';
// Configuration Model
export interface AppConfig {
apiUrl: string;
version: string;
features: {
@eladcandroid
eladcandroid / facade-pattern.ts
Created September 18, 2025 14:43
Angular Facade Pattern Example - Simplifies complex subsystem interactions by providing a unified interface
// Complex subsystems
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Observable, of, throwError, BehaviorSubject } from 'rxjs';
import { tap } from 'rxjs/operators';
// User Model
export interface User {
id: string;
name: string;
@eladcandroid
eladcandroid / statusline-command.sh
Created August 10, 2025 14:55 — forked from dhkts1/statusline-command.sh
statusline command for Claude Code
#!/bin/bash
# Make sure this file is executable: chmod +x ~/.claude/statusline-command.sh
# Claude Code statusline script - optimized with colors and emojis
# Reads JSON input from stdin and outputs a formatted status line to stdout
# Add to your ~/.claude/settings.json
#
# "statusLine": {
# "type": "command",
# "command": "bash ~/.claude/statusline-command.sh"
@eladcandroid
eladcandroid / ROADMAP.md
Last active June 3, 2025 10:30
ROADMAP.md

Getting Started

Description

Model Context Protocol (MCP) is a standardized protocol for connecting AI agents to various external tools and data sources. Imagine it as a USB-C interface - but for AI applications.

Just like USB-C simplifies the way different devices connect to a computer, MCP simplifies the way AI models interact with data, tools, and services.

MCP Diagrams

https://www.claudemcp.com/images/blog/what-is-mcp.png

@eladcandroid
eladcandroid / gist:74676c61fc4ae5ac0faf28149db45622
Created March 20, 2025 09:01
6.3.25-claude-with-superpowers-ROADMAP.md
## Getting Started
### Open the configuration file
```console
code ~/Library/Application\ Support/Claude/claude_desktop_config.json
```
```console
code %APPDATA%\Claude\claude_desktop_config.json
```
@eladcandroid
eladcandroid / products.ts
Created October 19, 2020 13:03
Angular Tutorial products.ts
export const products = [
{
name: 'Phone XL',
price: 799,
description: 'A large phone with one of the best screens'
},
{
name: 'Phone Mini',
price: 699,
description: 'A great phone with one of the best cameras'
@eladcandroid
eladcandroid / styles.scss
Created October 19, 2020 12:56
Angular Tutorial styles.scss
/* Global Styles */
* {
font-family: "Roboto", Arial, sans-serif;
color: #616161;
box-sizing: border-box;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
@eladcandroid
eladcandroid / vanillaReduxFinal.html
Last active April 16, 2020 10:54 — forked from Arieg419/vanillaReduxFinal.html
Refactor to arrow functions
<!DOCTYPE html>
<html>
<head>
<title>GoCode</title>
<script src="https://unpkg.com/redux@latest/dist/redux.min.js"></script>
</head>
<body>
<div>
<p>
Counter: <span id="value">0</span> times
@eladcandroid
eladcandroid / Default.vue
Last active February 24, 2020 12:52
Gridsome Workshop - Part 2
<template>
<div class="layout bg-gray-200 font-sans leading-normal tracking-normal">
<div
class="w-full m-0 p-0 bg-cover bg-bottom"
style="background-image:url('/cover.jpg'); height: 40vh; max-height:260px;"
>
<div
class="container max-w-4xl mx-auto pt-16 md:pt-15 text-center break-normal"
>
<!--Title-->