2014-01-01から1年間の記事一覧

Show table sizes in gigabytes on Redshift

STV_BLOCKLIST - Amazon Redshift select name as table_name, round((count(*) / 1024.0),2) as "GB" from stv_blocklist inner join (select distinct id, name from stv_tbl_perm) as names on names.id = stv_blocklist.tbl group by name order by "GB"…

Show running SQL on Redshift

STV_RECENTS - Amazon Redshift select pid, user_name, starttime, db_name, query, status from stv_recents where 1=1 and status = 'Running';

How to post a task to a Chatwork room using api

Preparation What you needs are ChatWork API Token Account ID Room ID First of all, ChatWorkToken. You can get it from link below: ChatWork After you get your token, follow this page. 認証方法 - チャットワークAPIドキュメント Next, Account D…

How to send an email via gmail api using bash

If you want to simply send an email from your servers, I think that the easiest way is using Gmail API. Not only unnecessary to launch mail server like postfix but also verify Email Address like in AWS. #!/bin/bash user="hoge@gmail.com" pa…

How to pipe only stderr in cron, and handle it as an arguement

01 8 * * * (bash hoge.sh >> /var/log/app/result.log) |& tee -a /var/log/app/result.log | fuga.sh "$(cat -)" Bash Reference Manual Bash Reference Manual tee(1) - Linux manual page fuga.sh can receive the value of "$(cat -)" as "$1".

How to change the font in Arduino IDE

Launch Arduino IDE Preferences Click preference.txt 4. change and add font settings editor.font=font_name,plain,14 editor.antialias=true Then, Restart Arduino. I like Ricty for coding. That's it!

Dancing VJ Machine By NES PowerPad + OpenFrameworks + Arduino + TV

This is my first Make! Exhibition Explanation ( In Japanese ) Tech Involved NES Power Pad Openframeworks v0.8.1 osx Arduino Uno Mac Book Pro 2011 Early PC to TV Downscan converter Thanks CyborgDino Ippei Okuda Ryohei Sasaki Source Code Att…

Maker Faire Tokyo 2014

have been to Maker Faire Tokyo 2014. Maker Faire Tokyo 2014 | Maker Faire Tokyo 2014 | Make: Japan have been to Mini Maker Faire in SXSW 2014 too. My impressive difference between them are 2 things below. Maybe it depends on the Fee for op…

国際免許の取得方法 - 東京・鮫洲試験上の場合

すでにAT普通免許を取得済みの方は、以下の手順で取得できます。 所要時間は20分くらい。瞬殺で取得出来ました。 必要なもの パスポート 運転免許証 5.0cm x 4.0cmの証明写真1枚 鮫洲試験場1Fで撮影出来ますが、800円もかかります。私のおすすめは、以下の手…

Algorithm Practice : Bubble Sort and Merge Sort.

Motivation Recently I take small tests on line like below. But I'm not good at actually.. paiza [パイザ] | IT/WEBエンジニアのためのコーディング転職サイト ITプログラマー・エンジニア転職のpaiza Understanding Algorithm is a kind of required s…

How to redirect to a URL in Nginx

Spec CentOS release 6.5 (Final) on Azure VM nginx version: nginx/1.6.2 How to $ sudo vim /etc/nginx/conf.d/hoge.conf server { .... server_name hoge.com .... } server { listen 80; server_name hoge.cloudapp.net; rewrite ^ http://hoge.com; } …

Nginx + MariaDB + Wordpress on CentOS6.5 (Azure VM)

Migrated a wordpress site from Sakura VPS to Microsoft Azure with changing web server from Apache to Nginx and database from MySQL to MariaDB. This is a How-To article step by step. Tech Involved with version CentOS release 6.5 (Final) PHP…

Midimessage - Javascript musical instrumental messaging application

I'm a newbie for creating javascript application but I really wanna improve my skill! So I have tried to create an Application which is mentioned in the title. Attention: This application sounds after clicking play button. http://midimessa…

A piece of advice of "dotfiles" to manage ~/.*rc files on Github for Mac

You have some ~/.*rc files, don't you? ls -lta ~/ | grep rc -rw-r--r-- 1 hoge staff 18 9 20 14:10 .jshintrc -rw-r--r-- 1 hoge staff 16 9 20 14:10 .bashrc -rw-r--r-- 1 hoge staff 34 7 13 21:23 .zshrc -rw-r--r-- 1 hoge staff 34 7 13 13:55 .v…

How to confirm version of CentOS

$ cat /etc/redhat-release CentOS release 6.5 (Final)

SQL to get missing sequential number

When defining a table like below: create table testtable ( id serial primary key, hoge varchar(24) ); A sequence "testtable_id_seq" has been created automatically as below: # \d List of relations Schema | Name | Type | Owner --------+-----…

How to Install RStudio and set up CasualImpact on Mac

Environment Mac OS X 10.9.4 Install RStudio and devtools Download RStudio - RStudio Launch it. install.packages("devtools") Done Installing. Install R Package - CasualImpact CausalImpact library(devtools) devtools::install_github("google/C…

Insert SQL with returning Id defined as Serial for PostgreSQL

When defining id as Serial create table testtable ( id serial primary key, hoge varchar(24) ); "RETURNING" clause returns inserted id. insert into testtable (hoge) values ('test') returning id; Query above returning below: insert into test…

Migrated Blogger to Hatenablog

I translated my blog from Blogger to Hatenablog. Export articles from Blogger. Setting -> the others -> export as .xml. Download translation tool. google-blog-converters-appengine Unzip and change directory to /bin. Move exported xml to th…

SXSW interactive 2014の旅費とか装備とか

もう5月やん。 旅費 2014年1月末に行くことを決めました。(開催1.5ヶ月ほど前) Austinに7日、San Franciscoに3日、3/5~3/16の合計10日間の旅。 科目金額備考 Interactive Badge ¥122,000 だいたい 航空券 ¥130,990 保険込み 宿泊費(Austin) ¥44,254 ホス…

SXSW Interactive 2014 My Summary

一言で言うと、「やばかった でかかった」公式イベントだけで5000以上、情報洪水を処理できない。寝る間を惜しんでずっと全力。そんな感じ。写真345枚ほどFacebookのアルバムにアップロードしました。こちら動画100本近くyoutubeにアップロードしました。SXS…

SXSWに遊びに行きます

3/6~3/13までの間ですが、SXSWに遊びに行きます。SXSWとは公式サイト:http://sxsw.com/サウス・バイ・サウスウエスト(South by Southwest、SXSW)とは、毎年3月にアメリカテキサス州オースティン市で行なわれる、音楽祭・映画祭・インタラクティブフェステ…

Yeomen使ってみた

仕事ではサーバーサイド開発を担当することが多いため、イマドキ?なフロントエンド開発の方法についてキャッチアップしとかないとな〜と言うことで、触ってみました。作ったものTTTTTTTT.co使ったものyeomen.ioyeomenとは何かYeoman is a robust and opinio…

Blog始めました

ウェブ・ソフトウェア開発に関することを色々と書いていこうと思います。ブログの挫折は過去4回、今回ばかりは頑張って続けたいと思います。