Skip to content

Instantly share code, notes, and snippets.

@novi
novi / perso_b.c
Last active May 13, 2020 14:56
Playing audio file (PCM) on NEXTSTEP 3.3
//Written by J. Laroche at the Center for Music Experiment at UCSD, San Diego //California. December 1990.
// File useful to test the stream control capabilities of the driver for
// writing streams (to the DACS). Currently (V. 2.0 prerelease fushia),
// aborting the stream wedges more or less the driver.
// Moreover, pause and resume work on any tagged region, whatever its tag is.
#import <sound/sound.h>
#import <sound/sounddriver.h>
#import <mach/mach.h>
#import <mach/mach_error.h>
$version = "2.0.5"
$hash = "4cb9620fbb68571be11ba13afc8911fd434561b9ff661040a128618af19bbbb5"
class Cmysql < Formula
homepage "https://github.com/novi"
url "https://github.com/novi/cmysql/archive/#{$version}.tar.gz"
sha256 $hash
version $version
depends_on "pkg-config"
@novi
novi / swift-on-arch-linux.md
Last active July 13, 2018 07:09
Swift on Arch Linux

Install debootstrap.

# pacman -S arch-install-scripts debootstrap

Install Ubuntu base system into $ROOTFS.

$ export ROOTFS=$HOME/rootfs
@novi
novi / cmysqlmariadb.rb
Created July 3, 2018 07:15
Homebrew Formula for cmysql-mariadb
$version = "2.1.0"
$hash = "3c8402e3cd8d0690638c41afd35ae1ee4fc9e3cd5b7010a39a917630333c40ae"
class Cmysqlmariadb < Formula
homepage "https://github.com/novi"
url "https://github.com/novi/cmysql-mariadb/archive/#{$version}.tar.gz"
sha256 $hash
version $version
depends_on "pkg-config"
@novi
novi / swift-arm-on-archlinux-rpi2.md
Last active February 8, 2017 04:11
Install Swift ARM on ArchLinux(Raspberry Pi2)

Install debootstrap.

# pacman -S arch-install-scripts debootstrap

Install Debian base system into $ROOTFS.

$ export ROOTFS=$HOME/rootfs
@novi
novi / devices.c
Created April 21, 2016 05:15
Retrieval audio devices of yours with CoreAudio HAL.
// $ clang -framework CoreAudio devices.c
#include <stdio.h>
#include <stdlib.h>
#include <CoreAudio/CoreAudio.h>
int main(int argc, char *argv[]) {
AudioObjectPropertyAddress theAddress = { kAudioHardwarePropertyDevices,
@novi
novi / bmpcc.md
Last active December 22, 2015 23:29
Blackmagic Design Pocket Cinema Camera メモ

たまにアップデートします

ボタンダブルクリックなどの操作もあるので一度説明書は読んだほうがよい。 サポートからダウンロードできるアプリで本体のファームウェアをアップデートできる。(ファームはネット経由の自動アップデートではないので毎回自分でアプリを更新する)

電源

  • 電池フル充電で1時間持たない。40分くらい。
  • Nikon純正の互換予備バッテリ必須。
@novi
novi / gist:5977158
Last active December 19, 2015 15:29
片仮名と平仮名を抜くブックマークレット。140文字は無理だった。
javascript:o='childNodes';p='nodeValue';function%20m(n){var%20c=n[o];for(i%20in%20c){e=c[i];e.nodeType==3&&(e[p]=e[p].replace(/[ぁ-んァ-ヶー]/g,''));e[o]&&m(e)}}m(document)
Yahoo ニュースの例 http://twitpic.com/d23do7
1文字コードずらす
javascript:o='childNodes';p='nodeValue';function%20m(n)%7Bvar%20c=n%5Bo%5D;for(i%20in%20c)%7Be=c%5Bi%5D;e.nodeType==3&&(e%5Bp%5D=e%5Bp%5D.replace(/%5B%E3%81%81-%E3%82%93%E3%82%A1-%E3%83%B6%5D/g,function(a,b)%7breturn%20String.fromCharCode(a.charCodeAt(0)-1)%7d));e%5Bo%5D&&m(e)%7D%7Dm(document)
平仮名片仮名交換
@novi
novi / gist:5791322
Last active December 18, 2015 13:39
Windows 8 に入れたアプリ一覧
  • Copy - クラウドストレージ
  • DropboxPortable AHK - DropboxをSDカードに置く
  • Git Extension - gitとGUIセット
  • Intellij - IDE
  • MacType - フォントのアンチエイリアシングを改善
  • MarkdownPad2 - Markdownエディタ
  • Rapid Environment Editor - 環境変数エディタ
  • Start8 - 7以前のスタートメニューを追加
  • WinRAR - ファイル解凍
  • WizMouse - マウスの挙動をMacに近づける
@novi
novi / gist:4040055
Created November 8, 2012 16:57 — forked from poutyface/gist:1223553
QEMU: 仮想ボード ARM Cortex-A9 マルチコアで Linux を動かす
モチベーション
---------------
Androidのエミュレータは中でQEMUを使ってる
中で使われているので、Android開発とは直接関係がないけど、
素のQEMUの使い方を知る。
* QEMUの使い方を覚える
* Linuxをエミュレータ環境で動かしてみる
* ARM のクロス環境に慣れてみる