Skip to content

Instantly share code, notes, and snippets.

View bols-blue's full-sized avatar

h.suehiro bols-blue

  • Hiroshima / Japan
View GitHub Profile
@bols-blue
bols-blue / gist:2a2b01534ba7ed32c7d80521792f6926
Created November 5, 2017 11:32
wordpress docker-compose
version: '2'
services:
db:
image: mysql:5.7
volumes:
- db_data:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: wordpress
FROM ubuntu:16.04
ADD apt.conf /etc/apt/apt.conf
RUN apt-get update
RUN apt-get install -y git-buildpackage
ADD proxy.sh /etc/profile.d/proxy.sh
RUN apt-get install -y golang
RUN GOPATH=/usr/lib/go/ go get github.com/Debian/dh-make-golang
RUN /usr/lib/go/bin/dh-make-golang github.com/aHisayoshiSuehiro/gomqtttest
@bols-blue
bols-blue / exeption.cc
Created May 30, 2017 10:02
C++ exeption sample
#include <iostream>
#include <stdexcept>
using namespace std;
class my_exception_t : public exception
{
const char * str;
public:
int data = 10;
@bols-blue
bols-blue / iex
Last active February 28, 2017 04:55
elixir で Unix Domain Socket を読み書きする ref: http://qiita.com/bols_blue/items/efe817413ec3c38c18bd
{:ok,socket}= :gen_udp.open(0, [{:ifaddr, {:local, "/tmp/testsockin"}}])
:gen_udp.send(socket,{:local, "/tmp/testsockin"}, 0, "test test \r\n")
receive do
tmp ->
IO.inspect tmp
after 3000 ->
IO.puts "time out"
end
@bols-blue
bols-blue / fs.txt
Last active February 13, 2017 14:37 — forked from anonymous/fs.txt
kernel param
Documentation for /proc/sys/fs/* kernel version 2.2.10
(c) 1998, 1999, Rik van Riel <riel@nl.linux.org>
(c) 2009, Shen Feng<shen@cn.fujitsu.com>
For general info and legal blurb, please look in README.
==============================================================
This file contains documentation for the sysctl files in
/proc/sys/fs/ and is valid for Linux kernel version 2.2.
$ ssh-agent.exe bash
bols@WIN-PJMTR139R3V ~
$ ssh-add ~/.ssh/
id_rsa id_rsa.pub known_hosts
bols@WIN-PJMTR139R3V ~
$ ssh-add ~/.ssh/id_rsa
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@bols-blue
bols-blue / install_aluminium.sh
Last active August 29, 2015 14:13
aluminium-ubuntu-14-04
#!/bin/bash
apt-get -y update
apt-get -y dist-upgrade
# install ruby tools
apt-get install -y ruby-dev ruby1.9.3
gem install rubygems-update
update_rubygems
gem install bundler

JQuery のコーディング規約

オブジェクトの型チェック

  • 文字列( String ): typeof object === "string"
  • 数値( Number ): typeof object === "number"
  • ブール( Boolean ): typeof object === "boolean"

例外設計の話。

こんな指針がいいのかなー 2013 夏 ver.

例外の目的とは?

.NET の「例外のデザインのガイドライン」にもこう書いてある。

# -*- coding: utf-8 -*-
import sys
import webbrowser
from Tkinter import Tk, Button
from PySide import QtGui
from pyside_from_ui_desiner import Ui_Dialog