Skip to content

Instantly share code, notes, and snippets.

View blueskyjunkie's full-sized avatar

Russell blueskyjunkie

View GitHub Profile
How to keep git log and less output on the screen
http://serebrov.github.io/html/2014-01-04-git-log-and-less-keep-output.html
Just for git commands:
git config --global --replace-all core.pager "less -iXFR"
For less globally (including git) - add to .bashrc / .zshrc / etc:
export LESS=-iXFR
The options we set for less are:
@holgi
holgi / asyncio-mock-example.py
Created January 30, 2019 13:31
Example for mocking async context managers
import pytest
import aiohttp
import asyncio
from asynctest import CoroutineMock, MagicMock, patch
# Example Code
async def fetch(session, url):
@willurd
willurd / web-servers.md
Last active April 26, 2024 18:00
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000