Skip to content

Instantly share code, notes, and snippets.

@ashnoa
ashnoa / .vimrc_for_me
Created January 11, 2024 16:47
.vimrc_for_me
" カラー表示
syntax enable
colorscheme desert
" エンコーディング
set encoding=utf-8
scriptencoding utf-8
set fileencoding=utf-8 " 保存時の文字コード
set fileencodings=ucs-boms,utf-8,euc-jp,cp932 " 読み込み時の文字コードの自動判別. 左側が優先される
import cv2
class BMP2GBAConverter:
def __init__(self, img):
self.img = img
def _convert_24bit_to_16bit(self, bgr):
b = bgr[0] >> 3
g = bgr[1] >> 3
aws lambda list-functions --query "reverse(sort_by(DATA, &SORT_KEY_DATA)) | SORTED_DATA"
https://chart.googleapis.com/chart?cht=qr&chs=【縦(整数)】x【横(整数)】&chl=【ここに内容】&choe=UTF-8
<html>
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.0.0/p5.js"></script>
<script src="sketch.js"></script>
</head>
<body>
</body>
</html>
@ashnoa
ashnoa / get_cc_greater_than_B_with_radon.sh
Created April 20, 2020 23:55
For develop with django
radon cc -s '.' | egrep '[B-Z] \([0-9]+\)'
@ashnoa
ashnoa / dynoload.js
Last active June 10, 2022 04:42
To translate by pandoc
var fileref=document.createElement('script')
fileref.setAttribute("type","text/javascript")
fileref.setAttribute("src", "http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML")
document.getElementsByTagName("head")[0].appendChild(fileref)
@ashnoa
ashnoa / curl_get.sh
Created April 20, 2020 23:41
Often usage of curl
curl -sS -v -w "\n" "Here is URL" -b if_you_need_cookie_use_option