Skip to content

Instantly share code, notes, and snippets.

View hiroaki-yamamoto's full-sized avatar
🍵
I code while I'm on github. I read books while I'm off github.

Hiroaki Yamamoto hiroaki-yamamoto

🍵
I code while I'm on github. I read books while I'm off github.
View GitHub Profile
@sirodoht
sirodoht / migrate-django.md
Last active July 9, 2024 19:56
How to migrate Django from SQLite to PostgreSQL

How to migrate Django from SQLite to PostgreSQL

Dump existing data:

python3 manage.py dumpdata > datadump.json

Change settings.py to Postgres backend.

Make sure you can connect on PostgreSQL. Then:

@IgnoredAmbience
IgnoredAmbience / 99-noto-mono-color-emoji.conf
Last active May 8, 2024 06:50
Noto Emoji Color fontconfig for Konsole
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!--
Noto Mono + Color Emoji Font Configuration.
Currently the only Terminal Emulator I'm aware that supports colour fonts is Konsole.
Usage:
0. Ensure that the Noto fonts are installed on your machine.
1. Install this file to ~/.config/fontconfig/conf.d/99-noto-mono-color-emoji.conf
@lost-theory
lost-theory / tests.py
Created August 18, 2012 07:09
mock render_template
from mock import patch #http://pypi.python.org/pypi/mock
import flask
import myapp
@patch('flask.templating._render', return_value='')
def test_mocked_render(mocked):
t = myapp.app.test_client()
print "mocked", repr(t.get("/").data)
print "was _render called?", mocked.called