Skip to content

Instantly share code, notes, and snippets.

View perebaj's full-sized avatar
🎯
Focusing

Jonathan perebaj

🎯
Focusing
View GitHub Profile
@p4tin
p4tin / handlers_test.go
Created March 22, 2016 17:27
Testing Http Handlers in GO
package main
import (
"net/http"
"testing"
"net/http/httptest"
)
func TestHealthCheckHandler(t *testing.T) {
// Create a request to pass to our handler. We don't have any query parameters for now, so we'll
@gagarine
gagarine / fish_install.md
Last active July 22, 2024 08:08
Install fish shell on macOS Mojave with brew

Installing Fish shell on MacOS (Intel and M1) using brew

Fish is a smart and user-friendly command line (like bash or zsh). This is how you can instal Fish on MacOS and make your default shell.

Note that you need the https://brew.sh/ package manager installed on your machine.

Install Fish

brew install fish

@jossef
jossef / force-delete-k8s-namespace.py
Created August 13, 2020 12:50
force delete k8s namespace
#!/usr/bin/env python3
import atexit
import json
import requests
import subprocess
import sys
namespace = sys.argv[1]
proxy_process = subprocess.Popen(['kubectl', 'proxy'])
atexit.register(proxy_process.kill)
@saichenko
saichenko / conftest_alembic.py
Created October 14, 2021 19:38
Example of configuring a database with Alembic migrations using the 'pytest-async-sqlalchemy' lib
import asyncio
import pytest
from alembic.command import upgrade as alembic_upgrade
from alembic.config import Config as AlembicConfig
from pytest_async_sqlalchemy import create_database, drop_database
@pytest.fixture(scope="session")
def event_loop():