Skip to content

Instantly share code, notes, and snippets.

View hiroaki-yamamoto's full-sized avatar
The most important thing to understand about me is to understand myself.

Hiroaki Yamamoto hiroaki-yamamoto

The most important thing to understand about me is to understand myself.
View GitHub Profile
@hiroaki-yamamoto
hiroaki-yamamoto / settings.json
Last active January 9, 2020 00:08
My vscode's settings.json
{
"workbench.startupEditor": "newUntitledFile",
"workbench.colorTheme": "One Dark Pro",
"editor.fontSize": 12,
"editor.rulers": [80],
"editor.tabSize": 2,
"[python]": {
"editor.tabSize": 4
},
"atomKeymap.promptV3Features": true,
@hiroaki-yamamoto
hiroaki-yamamoto / handle_code_137_docker.md
Last active July 22, 2024 16:36
How to handle exit code 137 on docker

Problem

When you use docker with "multiple commands", you will write scripts like this:

run.sh

#!/bin/sh -e

pip install --upgrade poetry
poetry config settings.virtualenvs.create false
poetry install

[検閲済み]

Keybase proof

I hereby claim:

  • I am hiroaki-yamamoto on github.
  • I am hyamamoto (https://keybase.io/hyamamoto) on keybase.
  • I have a public key ASCo4YSg57cOpZmu7mVJdPQNsKTEv5BRXStahU_KpnIWVwo

To claim this, I am signing this object:

@hiroaki-yamamoto
hiroaki-yamamoto / base.py
Last active May 12, 2017 07:09
Useful Template View Test Base Classes
#!/usr/bin/env python
# coding=utf-8
"""View test base."""
from urllib import parse
from django.conf import settings
from django.contrib.auth import authenticate, get_user_model, get_user
from django.core.urlresolvers import reverse, resolve
@hiroaki-yamamoto
hiroaki-yamamoto / snippets.cson
Created November 14, 2016 12:57
Atom Snippet
# Your snippets
#
# Atom snippets allow you to enter a simple prefix in the editor and hit tab to
# expand the prefix into a larger code block with templated values.
#
# You can create a new snippet in this file by typing "snip" and then hitting
# tab.
#
# An example CoffeeScript snippet to expand log to console.log:
#
@hiroaki-yamamoto
hiroaki-yamamoto / gulpfile.coffee
Created October 17, 2016 09:32
I wanna do somethig
g.task "third_party", ->
prefix = "app/home/static/third_party"
files = [
"#{prefix}/angular/angular.js"
"#{prefix}/angular-animate/angular-animate.js"
"#{prefix}/angular-aria/angular-aria.js"
"#{prefix}/angular-messages/angular-messages.js"
"#{prefix}/angular-resource/angular-resource.js"
"#{prefix}/angular-material/angular-material.js"
]
@hiroaki-yamamoto
hiroaki-yamamoto / .konsole_blur_effect
Created July 12, 2016 01:47
Blur Effect for konsole
#!/bin/sh
# How to use it: include this file from shell rc file.
# e.g. source .konsole_blur_effect
# Blur Active Konsolw window
service="org.kde.konsole"
windows=($(qdbus ${service} 2>null| grep -E '^/konsole/MainWindow_[0-9]+$'))
for window in ${windows}; do
is_active="$(qdbus ${service} ${window} org.qtproject.Qt.QWidget.isActiveWindow)"
@hiroaki-yamamoto
hiroaki-yamamoto / gist:f25676f0958fc42890f1
Created June 18, 2015 05:25
Disqus SSO remote_auth generation function
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from hashlib import sha1
from hmac import new
from time import time
import base64
import json
def generate_msg(secret, _id, username, email):
json_str = json.dumps({