Skip to content

Instantly share code, notes, and snippets.

View alexandermikuta's full-sized avatar
💻
Coding...

Alexander Mikuta alexandermikuta

💻
Coding...
View GitHub Profile
@nimone
nimone / Sidebar.jsx
Created June 29, 2023 09:33
Retractable Sidebar Component purely in ReactJS and TailwindCSS
import { MoreVertical, ChevronLast, ChevronFirst } from "lucide-react"
import { useContext, createContext, useState } from "react"
const SidebarContext = createContext()
export default function Sidebar({ children }) {
const [expanded, setExpanded] = useState(true)
return (
<aside className="h-screen">
@jamiepine
jamiepine / settings.json
Last active September 5, 2025 13:52
VSCode Settings
{
"editor.fontSize": 13,
"editor.lineHeight": 1.8,
"editor.fontWeight": "normal",
"debug.console.fontFamily": "dank mono, monaco, monospace",
"editor.fontFamily": "dank mono, monaco, monospace",
"workbench.iconTheme": "bearded-icons",
"editor.fontLigatures": true,
// "workbench.colorCustomizations": {
// "editorGutter.background": "#131521",
@AndrewLester
AndrewLester / pages.yml
Last active December 28, 2024 05:13
Github Actions Workflow Deploy SvelteKit Github Pages
# Updated from SvelteKit docs. See https://kit.svelte.dev/docs/adapter-static#github-pages for more information
name: Deploy to GitHub Pages
on:
push:
branches: 'main'
jobs:
build_site:
@kocisov
kocisov / urql.ts
Created August 20, 2021 15:04
Urql client with @n1ru4l/live-query + json patch (over WS or SSE)
import { applyLiveQueryJSONPatch } from "@n1ru4l/graphql-live-query-patch-json-patch";
import {
applyAsyncIterableIteratorToSink,
makeAsyncIterableIteratorFromSink,
} from "@n1ru4l/push-pull-async-iterable-iterator";
import { createClient as createWSClient } from "graphql-ws";
import {
cacheExchange,
createClient,
dedupExchange,
@mh-firouzjah
mh-firouzjah / better_powershell.md
Last active October 3, 2025 16:01
how to add zsh-like theme and feature to windows powershell

Better PowerShell

Theme | History | KeyBinding

MyPowershell

in order to make windows powershell more comfortable and add a some theme and features like history binding, auto complete on keypress and so on, if you have used linux teminl wiht zsh for example, we are going to make powershell like that as much as we can.

What we will achieve

@petelacey
petelacey / Dockerfile
Last active April 7, 2025 01:02
Docker Compose setup for Elixir, Phoenix, and Postgres
FROM elixir:latest
# Install debian packages
RUN apt-get update && \
apt-get install --yes build-essential inotify-tools postgresql-client git && \
apt-get clean
ADD . /app
# Install Phoenix packages

Using server-sent events

Why and how?

  • Documentation: https://web.dev/articles/eventsource-basics
  • Use case: broadcasting data from server to browsers
  • Benefits:
    • Easy to understand and implement (only a few lines of code)
    • No library is needed
  • Can use same HTTP(S) authentication as elsewhere in the app (which can’t be done with websockets)
@jfcherng
jfcherng / st4-changelog.md
Last active May 30, 2025 15:19
Sublime Text 4 changelog just because it's not on the official website yet.
@kalpeshsingh
kalpeshsingh / pre-push
Last active April 26, 2024 04:31
A pre-push git hook that notify Amazon Chime group
#!/bin/sh
branch="$(git rev-parse --abbrev-ref HEAD)"
# get computer name to append in Chime message
username=$USER
# a branch name where you want to prevent git push. In this case, it's "master"
if [ "$branch" = "master" ]; then
echo "You can't commit directly to '"${branch}"' branch" # webstorm or intellij will show this as popup
@danielepolencic
danielepolencic / README.md
Last active October 27, 2024 08:34
Create 3 nodes Kubernetes cluster locally with Vagrant

3 Virtual Machines Kubernetes cluster

Dependencies

You should install VirtualBox and Vagrant before you start.

Creating the cluster

You should create a Vagrantfile in an empty directory with the following content: