Skip to content

Instantly share code, notes, and snippets.

概要

2023-03-18時点の記事です。

想定利用者:

  • Macbookなどを新しく入手後にプログラミングの仕事をしたい経験者向け。viが分かり、GitHubのアカウントがある人

やること:

  • Homebrewでツールを簡単にインストールできるようにする
  • iterm2などのツールや .zshrc による設定ででSHELL上でのコマンド実行を快適にする。お好みでプロンプトも変更
@hirokts
hirokts / underscore_backslash.json
Last active October 4, 2019 06:58
JIS配列のMacキーボードでKalabinier-elementsを使ってアンダースコアのあるキーをバックスラッシュに、yenのあるキーをyenにする (2019.10.04)
{
"title": "Exchange underscore to backslash",
"rules": [
{
"description": "Exchange underscore to backslash",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "international1",
@hirokts
hirokts / django-pdf-download-views.py
Created October 19, 2018 03:03
PDFのダウンロードをAPIViewでやる場合 Django rest framework
import os
from urllib.parse import quote
from django.conf import settings
from django.http import HttpResponse
from rest_framework.views import APIView
class DownloadTermPDF(APIView):
@hirokts
hirokts / html-parser-comment-problem.py
Last active December 26, 2017 07:25
HTMLParserでうまくコメントが除去されない(Python3.6)
class MLStripper(HTMLParser):
def __init__(self):
self.reset()
self.strict = False
self.convert_charrefs= True
self.fed = []
def handle_data(self, d):
# ここのif文は本来なくていいはずなんだけど、<style>などのあとに改行で<!--コメントがあると
# <style>除去のあと改行から始まる<!--がdataとして扱われ、それがコメント扱いにならない
@hirokts
hirokts / django-docker-compose-intellij-debug.md
Last active August 24, 2018 02:21
Django with Docker composeでのIntelliJデバッグ方法

この情報は古いので、こちらの記事の方が参考になると思います。 https://qiita.com/tofu2323/items/c046329775292be67dd3

以下、旧版の情報

※前提として、docker-compose upでアプリが起動できる状態になっていること

  1. IntelliJのpythonプラグインディレクトリ内のpycharm-debug.eggを探す