Skip to content

Instantly share code, notes, and snippets.

@mountcedar
mountcedar / file0.txt
Created February 18, 2014 04:00
sshで公開鍵認証を使ってアクセスする ref: http://qiita.com/mountcedar/items/43157ff1225c56500655
$ cd ~/.ssh
$ ssh-keygen -t rsa -f <filename>
@mountcedar
mountcedar / file0.txt
Created February 20, 2014 08:43
Xcode5でboostライブラリを使う ref: http://qiita.com/mountcedar/items/0734ae1cac67d46896b9
template < typename Lhs, typename Rhs >
struct operator_exists {
static ::boost::type_traits::yes_type check(has_operator); // this version is preferred when operator exists
static ::boost::type_traits::no_type check(no_operator); // this version is used otherwise
BOOST_STATIC_CONSTANT(bool, value = (sizeof(check(((make<Lhs>() BOOST_TT_TRAIT_OP make<Rhs>()),make<has_operator>())))==sizeof(::boost::type_traits::yes_type)));
};
@mountcedar
mountcedar / file0.txt
Created March 10, 2014 05:25
iTunesで取得したm4aをwavに変換する方法 ref: http://qiita.com/mountcedar/items/18c3518d8c384f93fac7
#!/usr/bin/env python
import os
import commands
import logging
import traceback
if __name__ == '__main__':
outputdir = os.path.abspath(“<path to output>”)
@mountcedar
mountcedar / django.wsgi
Created March 11, 2014 13:19
ubuntuとapacheを使ったdjangoサーバの運用 ref: http://qiita.com/mountcedar/items/179fb0d9f4f87f9241c6
#!/usr/bin/env python
# coding: utf-8
import os
import sys
sys.path.append('/data/www')
sys.path.append('/data/www/webservices')
os.environ['DJANGO_SETTINGS_MODULE'] = 'webservices.settings'
@mountcedar
mountcedar / file0.txt
Last active August 29, 2015 14:00
今更聞けないSubversionの使い方 ref: http://qiita.com/mountcedar/items/e756bb9136e3b1722bb2
Apache Subversion(アパッチ・サブバージョン SVN)はプログラムのソースコードなどを管理する集中型バージョン管理システムの一つである。元々は、CollabNet, Inc. が開発していたが、2009年11月7日にApache Incubatorプロジェクトのひとつとなり、2010年2月17日よりApacheのトッププロジェクトとなった。ライセンスはApache Licenseに準じたものとなっている。
歴史的には広く使われているバージョン管理システムの一つにCVSがあった。CVSはよくできているが、ディレクトリの移動の管理やネットワーク対応の点、不可分な更新などでやや難があった。これらCVSの問題点を解決すべく開発されたのがSubversionである。 古くからオープンソースソフトウェアの開発においてはCVSが多く使われていたが、近年ではSubversionを使用するオープンソースプロジェクトも多くなりつつある。
$ pip install ipython
@mountcedar
mountcedar / file0.txt
Created May 8, 2014 12:29
ipython notebookをubuntu12.04に入れてみた ref: http://qiita.com/mountcedar/items/d02d72309e5aaf3d45a2
$ sudo apt-get install ipython
@mountcedar
mountcedar / file0.txt
Created May 20, 2014 06:34
homebrewでtapに含まれるパッケージのバージョン変更をする ref: http://qiita.com/mountcedar/items/fcc57b637d29f0af531c
$ brew versions nkf
Warning: brew-versions is unsupported and may be removed soon.
Please use the homebrew-versions tap instead:
https://github.com/Homebrew/homebrew-versions
2.1.3 git checkout b0ebf92 Library/Formula/nkf.rb
2.1.2 git checkout 9ad1b87 Library/Formula/nkf.rb
2.1.0 git checkout d0efd9e Library/Formula/nkf.rb
$ cd `brew —prefix`
$ git checkout b0ebf92 Library/Formula/nkf.rb
$ brew upgrade nkf
@mountcedar
mountcedar / file0.txt
Last active August 29, 2015 14:01
anyenvでpython環境を整える ref: http://qiita.com/mountcedar/items/8b9c1e4a90c68d847467
This is a simple wrapper for rbenv style environment managers. You don't have to git clone or modify your shell profile for each **env anymore if you install anyenv.
@mountcedar
mountcedar / .theanorc
Created May 28, 2014 07:06
Mavericksにtheanoをインストールする ref: http://qiita.com/mountcedar/items/f2e0db21121d35040aaf
[gcc]
cxxflags=-march=corei7