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 / .vimrc
Created July 22, 2014 09:06
vimrc that I'm usually using
" All system-wide defaults are set in $VIMRUNTIME/archlinux.vim (usually just
" /usr/share/vim/vimfiles/archlinux.vim) and sourced by the call to :runtime
" you can find below. If you wish to change any of those settings, you should
" do it in this file (/etc/vimrc), since archlinux.vim will be overwritten
" everytime an upgrade of the vim packages is performed. It is recommended to
" make changes after sourcing archlinux.vim since it alters the value of the
" 'compatible' option.
" This line should not be removed as it ensures that various options are
" properly set to work with the Vim-related packages.
@hiroaki-yamamoto
hiroaki-yamamoto / .zshenv
Created July 22, 2014 09:08
Z shell config files that I'm usually using
HISTFILE=~/.history
HISTSIZE=10
SAVEHIST=10
#Video Accel
export EDITOR="vim"
export LIBVA_DRIVER_NAME=vdpau
export VDPAU_DRIVER=radeonsi
export PINENTRY="/usr/bin/pinentry-qt4"
export PATH="${PATH}:${HOME}/bin:${HOME}/.gem/ruby/2.1.0/bin"
@hiroaki-yamamoto
hiroaki-yamamoto / .zshrc
Created April 17, 2015 13:08
.zshrc I'm usually using on OS X
#Load auto completion module, colors, and history functions.
autoload -U compinit promptinit colors smart-insert-last-word
compinit
promptinit
colors
zstyle ':completion:*:default' menu select=1 ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z} r:|[-_.]=**'
#Prompt
PROMPT="[%{$fg[green]%B%}%n%{%b$reset_color%}@%{$fg[magenta]%B%}%M%{%b$reset_color%} (%{$fg[yellow]%B%}%l%{%b$reset_color%}) %{$fg[cyan]%B%}%~%{%b$reset_color%}]"
@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({
@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 / 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 / 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 / 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

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: