Skip to content

Instantly share code, notes, and snippets.

@jimbojsb
jimbojsb / gist:1630790
Created January 18, 2012 03:52
Code highlighting for Keynote presentations

Step 0:

Get Homebrew installed on your mac if you don't already have it

Step 1:

Install highlight. "brew install highlight". (This brings down Lua and Boost as well)

Step 2:

@uasi
uasi / git-svn.markdown
Last active March 5, 2024 07:06
git-svn の使い方メモ

git-svn の使い方メモ

git-svn の使い方をメモする。他によいプラクティスがあれば指摘していただけるとありがたい。

用語

SVN のブランチと git のブランチが混在しているため、ここではブランチという語を以下のように区別する。

  • ブランチ、 SVN ブランチ:$SVN_REPO/branches 以下にあるディレクトリ
  • ローカルブランチ:git のローカルブランチ
  • リモートブランチ:git のリモートブランチ
@gereon
gereon / gist:3150445
Created July 20, 2012 12:20
Mac OSX Spotlight Enhancement

Mac OSX Spotlight Enhancement

Add this to Info.plist in /System/Library/Spotlight/RichText.mdimporter/Contents/ and Spotlight will search for source code files.

<string>public.c-header</string>
<string>public.c-plus-plus-header</string>
<string>public.c-source</string>
<string>public.objective-c-source</string>
public.c-plus-plus-source
prefix publisher journals dois
10.12679 0 0
10.7579 123Doc Education 0 0
10.3731 21st Century COE Program (Toplogical Science and Technology) 1 40
10.5775 A. I. Rosu Cultural Scientific Foundation Fundatia cultural-stiintifica A. I. Rosu 1 80
10.4037 AACN Publishing 2 766
10.1306 AAPG/Datapages 4 21817
10.3183 AB Svensk Papperstidning 1 1550
10.5769 ABEAT - Associacao Brasileira de Especialistas em Alta Tecnologia 1 57
10.7597 ACOPIOS - Revista Iberica de Mineralogia 1 9
10.12679 0 0
10.7579 123Doc Education 0 0
10.3731 21st Century COE Program (Toplogical Science and Technology) 1 40
10.5775 A. I. Rosu Cultural Scientific Foundation Fundatia cultural-stiintifica A. I. Rosu 1 80
10.4037 AACN Publishing 2 766
10.1306 AAPG/Datapages 4 21817
10.3183 AB Svensk Papperstidning 1 1550
10.5769 ABEAT - Associacao Brasileira de Especialistas em Alta Tecnologia 1 57
10.7597 ACOPIOS - Revista Iberica de Mineralogia 1 9
@RyosukeMiyahara
RyosukeMiyahara / checkExist.cpp
Created March 11, 2014 14:51
C++でファイルやフォルダが存在するかどうかを確認する
#include <iostream> // cout, endl
#include <sys/stat.h> // stat
int main(void) {
struct stat statFile;
struct stat statDirectory;
struct stat statNothing;
// if file/directory exists, stat() returns 0
// if file/directory does not exist, stat() returns -1
@mosmeh
mosmeh / how-to-use-giza-pp.md
Last active July 8, 2022 05:58
GIZA++ の使い方

GIZA++ の使い方

GIZA++ は、統計的機械翻訳に使われるアライメントツールで、 IBM Model 1-5 と HMM を実装しています。今回は、Europarl Parallel Corpus で配布されている英独対訳コーパスのアライメントの尤度を推定させてみます。

セットアップ

# GIZA++ の準備
$ wget http://giza-pp.googlecode.com/files/giza-pp-v1.0.7.tar.gz
$ tar xfz giza-pp-v1.0.7.tar.gz

$ cd giza-pp

@pn11
pn11 / search_article.rb
Last active June 29, 2016 15:39
素粒子・宇宙系の雑誌名、号数、ページ数からURLを生成。Macのopenでブラウザに飛ばす。Moved to -> https://github.com/pn11/OkaScripts/tree/master/src/research#search_article
#!/usr/bin/ruby
if ARGV.size == 3
journal=ARGV[0]
volume=ARGV[1]
page=ARGV[2]
elsif ARGV.size == 2
journal=ARGV[0]
page=ARGV[1]
else
puts "Number of Argument is wrong. Use like this:"
@pn11
pn11 / Geant4_install.md
Last active June 1, 2019 00:33
Geant4.10.01をMac OS X Yosemiteにインストールしたメモ。

Geant4.10.01インストールメモ

今後Mac上でGeant4のversionを上げるときに見るためのメモ。今回の環境は

  • OS X Yosemite 10.10.2
  • Homebrew 使用

Geant4 10.1以降だとG4AnalysisManagerでNtupleにvectorを入れられるようなのでversionを上げてみた。 手順はインストールするたびにお世話になっている奥村さんの

@pn11
pn11 / markdown_spotlight.md
Last active June 1, 2019 10:14
SpotlightでMarkdownを検索できるようにする + クイックルックで見れるようにする