Skip to content

Instantly share code, notes, and snippets.

@witsch
witsch / pythontidy.xml
Created September 25, 2011 13:07
Configuration file for PythonTidy
<config>
<parm name="COL_LIMIT" value="int(79)" />
<parm name="SHEBANG" value="" />
<parm name="PARENTHESIZE_TUPLE_DISPLAY" value="bool(False)" />
<parm name="ADD_BLANK_LINES_AROUND_COMMENTS" value="bool(False)" />
<parm name="ADD_BLANK_LINE_AFTER_DOC_STRING" value="bool(False)" />
<parm name="MAX_SEPS_FUNC_DEF" value="int(99)" />
<parm name="MAX_SEPS_FUNC_REF" value="int(99)" />
<parm name="WRAP_DOC_STRINGS" value="bool(True)" />
<parm name="NORMALIZE_DOC_STRINGS" value="bool(True)" />
@puremourning
puremourning / rfc.md
Last active February 12, 2019 15:25
RFC: Parameter hints popup menu

TL;DR

This RFC proposes introducing a second popup menu in insert mode to display method argument hints, current parameter, etc. similar to a number of IDEs and editors. The proposal is to allow scripts to control this (such as on insert of ( and ) characters) and for it to be non-interractive and not to interfere with insert-mode completion.

The purpose of the RFC is to guage the appetite from Bram and the community for such a feature, and to discuss the design/functional behaviours prior to

@iddan
iddan / sync_pipfile_setup.py
Last active August 25, 2019 14:41
Sync Pipfile and setup.py
# Sync Pipfile with setup.py dependencies
# Assumptions:
# - You are running in a directory with Pipfile, Pipfile.lock & setup.py
# - Your setup.py calls a function named setup()
# - setup() is called with keyword arguments of install_requires and dependency_links (can be empty lists)
# - All your remote dependencies are HTTPS git
import pipfile
import ast
import json
@plexus
plexus / svn_short_log
Created December 16, 2011 09:01
svn log, one line per commit
#!/usr/bin/awk -f
# Convert the "svn log" output into a one liner format, which is easier to grep
# or use in scripts. Pipe "svn log" into this script
# When we get a line that starts with a revision number, put the data in variables
/^r[0-9]+/ {
rev=$1
user=$3
date=$5
@olivierlacan
olivierlacan / gary_bernhardt_screencasting_parley.md
Created June 1, 2013 03:04
Gary Bernhardt on Screencasting

I'm planning on either writing this up in detail or maybe doing a screencast about screencasting, but I'll give a short version here.

On sound quality:

This matters a lot. In decreasing order of importance:

  1. Remove echo. You have to hear this to understand. Set up a mic in front of your mouth and record a sentence. Then, put a thick comforter over you and the mic and say it again at the same distance. Listen to
@romainl
romainl / _rnb.md
Last active August 12, 2021 21:56
RNB, a Vim colorscheme template
@YumaInaura
YumaInaura / 00_README.md
Last active July 22, 2023 03:58
Golang — Understanding channel, buffer, blocking, deadlock and happy groutines.

Golang — Understanding channel, buffer, blocking, deadlock and happy groutines.

I was so confused to understand behaviior of Golang channels, buffer, blocking, deadlocking and groutines.

I read Go by Example topics.

@nifl
nifl / grok_vi.mdown
Created August 29, 2011 17:23
Your problem with Vim is that you don't grok vi.

Answer by Jim Dennis on Stack Overflow question http://stackoverflow.com/questions/1218390/what-is-your-most-productive-shortcut-with-vim/1220118#1220118

Your problem with Vim is that you don't grok vi.

You mention cutting with yy and complain that you almost never want to cut whole lines. In fact programmers, editing source code, very often want to work on whole lines, ranges of lines and blocks of code. However, yy is only one of many way to yank text into the anonymous copy buffer (or "register" as it's called in vi).

The "Zen" of vi is that you're speaking a language. The initial y is a verb. The statement yy is a simple statement which is, essentially, an abbreviation for 0 y$:

0 go to the beginning of this line. y yank from here (up to where?)

@bryanbraun
bryanbraun / git-branching-diagram.md
Last active April 16, 2024 14:18
Example Git Branching Diagram

Example Git Branching Diagram

You can use this diagram as a template to create your own git branching diagrams. Here's how:

  1. Create a new diagram with diagrams.net (formerly draw.io)
  2. Go to File > Open From > URL
  3. Insert this url (it points to the xml data below): https://gist.githubusercontent.com/bryanbraun/8c93e154a93a08794291df1fcdce6918/raw/bf563eb36c3623bb9e7e1faae349c5da802f9fed/template-data.xml
  4. Customize as needed for your team.

@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