Skip to content

Instantly share code, notes, and snippets.

View informationsea's full-sized avatar

Yasunobu Okamura informationsea

View GitHub Profile
@informationsea
informationsea / post-macdeployqt.sh
Created February 15, 2014 17:03
Sign Qt based application
#!/bin/sh
if [ ! "$3" ]; then
echo $0 QTPREFIX APP INDENTIFY
exit 1
fi
prefix=$1
app=$2
id=$3
@informationsea
informationsea / create-sqlite-index.py
Last active August 29, 2015 13:56
Create SQLite Index for all tables.
#!/usr/bin/env python
import argparse
import sqlite3
def _main():
parser = argparse.ArgumentParser(description="SQLite3 Helper (Create Index)")
parser.add_argument('db')
parser.add_argument('table', nargs='*')
options = parser.parse_args()
#!/bin/sh
function run() {
$@
if test $? -ne 0; then
echo "Failed $@"
exit 1
fi
}
@informationsea
informationsea / MacPortsInstallList.txt
Created April 5, 2014 09:34
Mac Ports Install Package List
aspell
aspell-dict-en
autoconf
automake
autossh
bzr
cairo +quartz+x11
cairomm +quartz+x11
cmake
cutter
#!/usr/bin/env perl
use strict;
use warnings;
use utf8;
my $SMC_RESULT=`/usr/local/bin/smc -t`;
my $COUNTER = 0;
if (@ARGV == 1 && $ARGV[0] eq "config") {
print <<__END__;
@informationsea
informationsea / 00firstjulia.rst
Last active August 29, 2015 14:05
Juliaを使ってみる

Juliaをはじめてみる

計算をしてみる

1 + 2
@informationsea
informationsea / kyotocabinet-1.2.76-clang.patch
Created September 14, 2014 15:02
Kyoto Cabinet / OS X and clang support patch
diff -r -u kyotocabinet-1.2.76-original/kccommon.h kyotocabinet-1.2.76-mac/kccommon.h
--- kyotocabinet-1.2.76-original/kccommon.h 2012-05-25 01:27:59.000000000 +0900
+++ kyotocabinet-1.2.76-mac/kccommon.h 2014-09-15 00:01:22.000000000 +0900
@@ -82,7 +82,7 @@
using ::snprintf;
}
-#if __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__) || defined(_MSC_VER)
+#if __cplusplus > 199711L || defined(__GXX_EXPERIMENTAL_CXX0X__) || defined(_MSC_VER) || defined(__clang__)
@informationsea
informationsea / index.py
Created September 15, 2014 13:55
Gist List view
import sys
sys.path.insert(0, 'flask.zip')
sys.path.insert(0, 'werkzeug.zip')
from flask import Flask, render_template, request, abort, redirect, url_for
import json
import urllib2
import re
app = Flask(__name__)
@informationsea
informationsea / codesign.sh
Created September 21, 2014 06:09
Code sign script for Qt based application
#!/bin/sh
QTPATH=/usr/local/Qt-5.3.2-systemsqlite
CODE_SIGN_IDENTITY="Developer ID Application: YOURID"
APPNAME=APP.app
for i in `find ${APPNAME}/Contents/Frameworks -name '*.framework'`; do
BASENAME="${i##*/}"
pushd $i
@informationsea
informationsea / sensors_temp
Created December 30, 2014 01:42
Munin plugin for Raspberry Pi & ADT7410
. $MUNIN_LIBDIR/plugins/plugin.sh
if [ "$1" = "autoconf" ]; then
if [ -r /sys/class/thermal/thermal_zone0/temp ];then
echo yes
exit 0
else
echo "no (missing /sys/class/thermal/thermal_zone0/temp)"
exit 0
fi