Skip to content

Instantly share code, notes, and snippets.

@ayakix
ayakix / brew_install_git_logs
Created March 4, 2012 07:06 — forked from irasally/brew_install_git_logs
$brew install git is faild.(Mac OS X 10.6.8/ XCode 4.2)
$ brew install git
==> Downloading http://git-core.googlecode.com/files/git-1.7.9.2.tar.gz
File already downloaded in /Users/xxx/Library/Caches/Homebrew
==> make prefix=/usr/local/Cellar/git/1.7.9.2 CC=/usr/bin/llvm-gcc CFLAGS=-Os -w -pipe -march=core2 -msse4.1 LDFLAGS= install
GIT_VERSION = 1.7.9.2
* new build flags or prefix
* new link flags
./generate-cmdlist.sh > common-cmds.h+ && mv common-cmds.h+ common-cmds.h
rm -f git-am git-am+ && sed -e '1s|#!.*/sh|#!/bin/sh|' -e 's|@SHELL_PATH@|/bin/sh|' -e 's|@@DIFF@@|diff|' -e 's/@@GIT_VERSION@@/1.7.9.2/g' -e 's|@@LOCALEDIR@@|/usr/local/Cellar/git/1.7.9.2/share/locale|g' -e 's/@@NO_CURL@@//g' -e '/^# @@BROKEN_PATH_FIX@@$/d' git-am.sh >git-am+ && \
chmod +x git-am+ && \
@ayakix
ayakix / brew_install_git_logs
Created March 4, 2012 07:06 — forked from irasally/brew_install_git_logs
$brew install git is faild.(Mac OS X 10.6.8/ XCode 4.2)
$ brew install git
==> Downloading http://git-core.googlecode.com/files/git-1.7.9.2.tar.gz
File already downloaded in /Users/xxx/Library/Caches/Homebrew
==> make prefix=/usr/local/Cellar/git/1.7.9.2 CC=/usr/bin/llvm-gcc CFLAGS=-Os -w -pipe -march=core2 -msse4.1 LDFLAGS= install
GIT_VERSION = 1.7.9.2
* new build flags or prefix
* new link flags
./generate-cmdlist.sh > common-cmds.h+ && mv common-cmds.h+ common-cmds.h
rm -f git-am git-am+ && sed -e '1s|#!.*/sh|#!/bin/sh|' -e 's|@SHELL_PATH@|/bin/sh|' -e 's|@@DIFF@@|diff|' -e 's/@@GIT_VERSION@@/1.7.9.2/g' -e 's|@@LOCALEDIR@@|/usr/local/Cellar/git/1.7.9.2/share/locale|g' -e 's/@@NO_CURL@@//g' -e '/^# @@BROKEN_PATH_FIX@@$/d' git-am.sh >git-am+ && \
chmod +x git-am+ && \
@ayakix
ayakix / monday.vim
Created May 26, 2012 00:44
VimのC-aで月、火、水、木、キン肉マン!!!を実現する ref: http://qiita.com/items/0e2901b8402573aef6d5
call <SID>AddPair('or', 'and')
call <SID>AddPair('and', 'or')
@ayakix
ayakix / zsh_history_sort.py
Created October 11, 2012 11:50 — forked from nishio/git_stat.py
show active command on Zsh
from collections import Counter, defaultdict
import sys
try:
#FILENAME = "/Users/{hoge}/.zhistory"
FILENAME = sys.argv[1]
except:
print "USAGE: zsh_history_sort.py <your_history_file>"
sys.exit(1)
#! /usr/bin/env python
# -*- coding: utf-8 -*-
import pyaudio
import wave
import sys
import pylab
import numpy
import os
#! /usr/bin/env python# -*- coding: utf-8 -*-
import urllib
import zipfile
import json
import re
import os
from github import Github
GITHUB_TOKEN = "Enter Your GitHub Token"
@ayakix
ayakix / main.py
Last active December 12, 2015 04:08
#! /usr/bin/env python
# -*- coding: utf-8 -*-
import Levenshtein
import json
import sys
import zipfile
import os
OUTPUT_PATH = "./index.txt"
let s:unite_source = {
\ 'name': 'def',
\ }
function! s:unite_source.gather_candidates(args, context)
let s:exePath ="YOUR_DICT/main.py"
let s:path = expand('%:p')
let s:ext = expand('%:e')
let s:lines = getbufline('%', 1, '$')
let s:func_list = []
@ayakix
ayakix / ColorUtil.m
Created March 29, 2013 05:25
Utility and Tips for iPhone programming ref: http://qiita.com/items/fcccf652fd51a2f9b010
+(UIColor*) hexToUIColor:(NSString *)hex
{
if(hex.length == 6)
hex = [@"FF" stringByAppendingString: hex];
NSScanner *colorScanner = [NSScanner scannerWithString:hex];
unsigned int color;
[colorScanner scanHexInt:&color];
CGFloat a = ((color & 0xFF000000) >> 24)/255.0f;
CGFloat r = ((color & 0x00FF0000) >> 16)/255.0f;
CGFloat g = ((color & 0x0000FF00) >> 8) /255.0f;
@ayakix
ayakix / After.m
Created April 7, 2013 08:49
意識の高さからかコードフォーマッター設定を公開 ref: http://qiita.com/items/3f05da9541b8e130e39f
#import "Test.h"
@interface Test (Private)
- (void)hoge;
@end
@implementation Test {
NSString *str;
int index;
}