Skip to content

Instantly share code, notes, and snippets.

View romanlevin's full-sized avatar

Roman Levin romanlevin

View GitHub Profile
@romanlevin
romanlevin / trace.md
Created April 26, 2021 10:11
Starship config bug report
$ starship print-config --default > ~/.config/starship.toml
[DEBUG] - (starship::config): STARSHIP_CONFIG is not set
[DEBUG] - (starship::config): Using default config path: /Users/romanlevin/.config/starship.toml
[TRACE] - (starship::config): Config file content: "
# Warning: This config does not include keys that have an unset value
format = ''
scan_timeout = 0
command_timeout = 0
add_newline = false

Keybase proof

I hereby claim:

  • I am romanlevin on github.
  • I am romanlevin (https://keybase.io/romanlevin) on keybase.
  • I have a public key ASD8j2l3dxn-VbzBNJik7iPueyAIYwC1uko7kVNShUeOeAo

To claim this, I am signing this object:

@romanlevin
romanlevin / bash_prompt.sh
Last active May 25, 2022 02:35 — forked from insin/bash_prompt.sh
Set color bash prompt according to active pyenv, git branch and return status of last command.
#!/bin/bash
#
# DESCRIPTION:
#
# Set the bash prompt according to:
# * the active virtualenv
# * the branch/status of the current git repository
# * the return value of the previous command
# * the fact you just came from Windows and are used to having newlines in
# your prompts.
@romanlevin
romanlevin / mock_open_with_files.py
Last active November 29, 2015 19:32
Mock out the contents of several files with a single patch
from mock import MagicMock
def mock_open_with_files(files):
"""
`files` - a dictionary of the form
{
'/file/path/': 'file body',
...
}
"""
@romanlevin
romanlevin / keybase.md
Created May 24, 2014 08:16
keybase.md

Keybase proof

I hereby claim:

  • I am romanlevin on github.
  • I am romanlevin (https://keybase.io/romanlevin) on keybase.
  • I have a public key whose fingerprint is C7A7 6C90 6BB9 1C27 480D EA84 6B06 4B90 527C 01F5

To claim this, I am signing this object:

@romanlevin
romanlevin / upload_to_blobstore.py
Last active December 19, 2015 05:08
Python script for uploading an image to a Google App Engine Dev Server's Blobstore from an external URL.
import requests
DEV_SERVER_HOST = 'localhost'
INSTANCE_PORT = 8080
UPLOAD_PATH = 'admin/upload'
def upload_image(url):
def get_upload_url():
cookies = {'dev_appserver_login': 'test@example.com:True'}
resp = requests.get(