This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#version 150 | |
uniform sampler2D uTexture; | |
in VertexData { | |
vec3 baricentric; | |
vec4 color; | |
vec2 texcoord; | |
} vVertexIn; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <clang-c/Index.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
void printCodeCompletionSuggestions(CXTranslationUnit tu, char* source, unsigned line, unsigned column) { | |
struct CXUnsavedFile *unsavedFiles = NULL; | |
unsigned numUnsavedFiles = 0; | |
unsigned options = clang_defaultCodeCompleteOptions(); | |
CXCodeCompleteResults *results = clang_codeCompleteAt(tu, source, line, column, unsavedFiles, numUnsavedFiles, options); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##### Uncrustify config | |
# Objective-C | |
# ===== Preprocessor ===== | |
# via: http://qiita.com/items/dd7c5ffdff27451dae16 | |
# #if、#ifdef、#ifndef〜#else〜#endifブロック内のプロプロセッサをインデントするかどうか。{ ignore, add, remove, force } | |
pp_indent = add | |
# ソースコードのインデントレベルに合わせてインデントするかどうか。{ true, false } | |
pp_indent_at_level = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var dict = Dictionary<String,Bool>() | |
dict["a"] = true | |
dict["c"] = false | |
func matchOneOrTheOtherWithOptionals(a: Bool?, b: Bool?) -> String { | |
switch (a, b) { | |
case (.Some(true), let b) where b == .None || !b!: | |
return "a was true, but b was None or false" | |
case (let a, .Some(true)) where a == .None || a == .Some(false): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/KeySetting_Ainu.plist b/KeySetting_Ainu.plist | |
index 197b151..809b6b8 100644 | |
--- a/KeySetting_Ainu.plist | |
+++ b/KeySetting_Ainu.plist | |
@@ -13,14 +13,14 @@ | |
<key>command</key> | |
<string>direct_input</string> | |
<key>character</key> | |
- <string> </string> | |
+ <string> </string> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if expand('%') =~# '_spec\.rb$' | |
syn keyword rubyRspec describe context it specify it_should_behave_like before after setup subject | |
endif | |
hi def link rubyRspec Function |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@namespace url(http://www.w3.org/1999/xhtml); | |
@-moz-document domain("www.tumblr.com"), | |
domain("www.tumblr-beta.com") | |
{ | |
ol#posts li blockquote, | |
body.mceContentBody blockquote { | |
margin-left: 0 !important; | |
margin-right: 0 !important; | |
padding-left: 3px !important; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# vim: encoding=utf-8 filetype=ruby | |
require 'rubygems' | |
require 'optparse' | |
require 'yaml' | |
options = YAML.load(<<CONF) | |
color: true | |
verbose: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
XCodeの'グループとファイル'画面でターゲット選択、新規ビルドフェーズ(新規スクリプト)を追加 | |
スクリプトフェーズを最初に持ってくる('バンドルリソースをコピー'の前に持ってくる) | |
YourProject-Info.plistにVersionValueとVersionValueForDisplayキーを追加。VersionValueに\d+.\d+.\d+な文字列を入れる | |
スクリプトに以下を書く | |
VERSION=`cat ./YourProject-Info.plist | tr -d '\n\t' | perl -nle 'print ($_ =~ /^.*?<key>VersionValue<\/key><string>(\d+\.\d+\.\d+)<\/string>.*$/) ? $1 : ""'` | |
VERSION_FOR_DISPLAY=$VERSION-$CONFIGURATION-$ARCHS | |
/usr/libexec/PlistBuddy -c "Set :VersionValueForDisplay $VERSION_FOR_DISPLAY" ./YourProject-Info.plist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)scan { | |
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; | |
ALAssetsGroupType sources = ALAssetsGroupLibrary | ALAssetsGroupSavedPhotos; | |
NSMutableArray *tags = [[NSMutableArray alloc] init]; | |
ALAssetsGroupEnumerationResultsBlock assetsEnumerator = ^(ALAsset *result, NSUInteger index, BOOL *stop){ | |
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; | |
if (result) { | |
if ([[result valueForProperty:ALAssetPropertyType] isEqual:ALAssetTypePhoto]) { |
OlderNewer