Skip to content

Instantly share code, notes, and snippets.

View yakimka's full-sized avatar
💭
import __hello__

yakimka

💭
import __hello__
View GitHub Profile
@butla
butla / wait_for_tcp_port.py
Last active December 8, 2022 19:52
Waiting for a TCP port to start accepting connections (Python >=3.6)
"""
MIT License
Copyright (c) 2017 Michał Bultrowicz
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
Verb URI Action Route Name View Policy Middleware
GET /resources index resources.index resources.list list can:list,Resource::class
GET /resources/create create resources.create resources.create create can:create,Resource::class
POST /resources store resources.store create can:create,Resource::class
GET /resources/{resource} show resources.show resources.show view can:view,resource
GET /resources/{resource}/edit edit resources.edit resources.edit update can:update,resource

|

@Ellrion
Ellrion / LoggingServiceProvider.php
Last active February 5, 2019 16:53
Multiple logging (pool of loggers) for Laravel
<?php namespace App\Providers;
use App\Services\Log\WritersPool;
use Illuminate\Support\ServiceProvider;
use Monolog\Handler\RavenHandler;
use Psr\Log\LogLevel;
class LoggingServiceProvider extends ServiceProvider
{
public function boot()
@marians
marians / CouchDB_Python.md
Last active June 14, 2025 02:00
The missing Python couchdb tutorial

This is an unofficial manual for the couchdb Python module I wish I had had.

Installation

pip install couchdb

Importing the module

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
The Snowball stemmer.
Pavel Perestoronin © 2013
"""
import re
import unittest
@andreyvit
andreyvit / tmux.md
Created June 13, 2012 03:41
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a