2013-11-01から1ヶ月間の記事一覧

メールサーバの修正

/etc/aliasesのwebmasterがrootにエイリアスを貼られていたのでコメントアウトした /etc/aliases #webmaster: root# newaliasesポートが開いていなかったので 以下の記述をコメントアウトした。 -A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-p…

FabmodulesのBugfix

コンパイラとかBoostのバージョンによるのかもしれないけどビルドできなかったのでメモ。以下の3つのファイルを修正したらmake fabできた。 core/path_time.c 18行目 関数の前にvoidを追加 - fab_find_time(struct fab_vars *v, float units, float move, f…

RでTwitterを解析する

http://stackoverflow.com/questions/15058485/oauth-with-twitter-streaming-api-in-r-using-rcurlhttps://sites.google.com/site/miningtwitter/questions/talking-about/wordclouds/comparison-cloud library(RCurl) library(twitteR) library(ROAuth) re…

さくらVPSにメールサーバを設定する

http://d.hatena.ne.jp/katsuren/20120505/1336243329

pygettextでwxPythonの国際化

http://d.hatena.ne.jp/Megumi221/20101220/1292898732http://d.hatena.ne.jp/Megumi221/20101221/1292931441http://d.hatena.ne.jp/Megumi221/20101222http://d.hatena.ne.jp/Megumi221/20101224/1293187319

vectorで遭遇したSegmentation faultのエラー

原因調査中 #include <iostream> #include <string> #include <vector> using namespace std; int main(){ vector<int*> ard_val; int *current = new int[3]; current[0] = 1; current[1] = 2; current[2] = 3; cout << current[0] << "\n"; cout << current[1] << "\n"; cout << current[2] </int*></vector></string></iostream>…

PNG画像をicnsに変換するツール

http://76log.blogspot.jp/2009/08/pngicns-for-mac.htmlimg2icnsを使う。

py2appでアイコン画像を変更する

http://stackoverflow.com/questions/5608080/how-to-specify-py2app-icon

wxPythonでsizerのネスト

import wx class MyFrame(wx.Frame): def __init__(self,parent,id,title): wx.Frame.__init__(self,parent,id,title,wx.DefaultPosition,wx.DefaultSize) panel = wx.Panel(self,-1) vbox = wx.BoxSizer(wx.VERTICAL) hbox1 = wx.BoxSizer(wx.HORIZONTAL) h…

wxPythonで複数のPanelを使う

http://stackoverflow.com/questions/8771150/wxpython-multiple-panels import wx class RandomPanel(wx.Panel): def __init__(self, parent, color): wx.Panel.__init__(self, parent) self.SetBackgroundColour(color) class MainPanel(wx.Panel): def __…

wxPythonのテンプレート

#!/usr/bin/env python #-*- coding:utf-8 -*- import wx class MyFrame(wx.Frame): def __init__(self,parent,id,title): wx.Frame.__init__(self,parent,id,title,wx.DefaultPosition,wx.DefaultSize) class MyApp(wx.App): def OnInit(self): frame = MyF…

py2appでMacのアプリケーションバンドルを作る

超簡単だった。 # py2applet --make-setup main.py # python setup.py py2app -Adistディレクトリの中にmain.appが生成される。

wxPythonの使い方

だんだんわかってきた。 #!/usr/bin/env python #-*- coding:utf-8 -*- import wx import os import commands class MyFrame(wx.Frame): def __init__(self,parent,id,title): wx.Frame.__init__(self,parent,id,title,wx.DefaultPosition,wx.DefaultSize) l…

Pythonでターミナルの出力を取得する

http://stackoverflow.com/questions/3503879/assign-output-of-os-system-to-a-variable-and-prevent-it-from-being-displayed-on import commands status, output = commands.getstatusoutput("cat /etc/services") 例 >>> import commands >>> status, ou…

wxPythonでボタンを使う

#!/usr/bin/env python #-*- coding:utf-8 -*- import wx class MyFrame(wx.Frame): def __init__(self,parent,id,title): wx.Frame.__init__(self,parent,id,title,wx.DefaultPosition,wx.DefaultSize) lyrics = ''' push the button1 please ''' self.pane…

Emacsで選択部分(リージョン)をハイライトする

http://stackoverflow.com/questions/2747542/emacs-23-selection-not-highlighted?answertab=votes#tab-top~/.emacsに以下を追加。 (transient-mark-mode t)

特定のPATHを削除する

ここを参考に。 http://qiita.com/ironsand/items/10e28d7589298090ec23~/.zshrcに以下を追加 path_append () { path_remove $1; export PATH="$PATH:$1"; } path_prepend () { path_remove $1; export PATH="$1:$PATH"; } path_remove () { export PATH=`ec…

MacでiModelaを動かす

ここの記述に従ってやってみる。環境はOS X 10.9 Mavericks。 https://github.com/t-oster/LibLaserCut/issues/9プリンタとしてiModelaを追加する。CUPSというのを使うらしい。 http://localhost:631 でCUPS画面が出る。出ない場合はターミナルで $ cupsctl …

無料でSSL証明書を発行する(サーバのHTTPS対応)

http://qiita.com/k-shogo/items/870b6d3939dd08da2de4