$ brew install postgresql
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
# atom-sync-settings |
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
public class SamplePermissionActivity extends AppCompatActivity { | |
// ... | |
private static final int PERMISSIONS_REQUEST_READ_PHONE_STATE = 1; | |
private void checkPermission() { | |
if (ContextCompat.checkSelfPermission(this, Manifest.permission.READ_PHONE_STATE) != PackageManager.PERMISSION_GRANTED) { | |
// 許可されてない |
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
import Foundation | |
func unwrap2<T1, T2>(a: T1?, b: T2?) -> (T1, T2)? { | |
switch (a, b) { | |
case (let .Some(a), let .Some(b)): | |
return (a, b) | |
default: | |
return nil | |
} | |
} |
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
// フォルダを指定して一括リサイズ | |
function resizeImage(file, destFolder) { | |
try { | |
var doc = open(file, OpenDocumentType.PNG) | |
if (doc == null) { | |
throw "Something is wrong with the file. Make sure it's a valid PNG file."; | |
} |
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
#! /bin/sh | |
# TestFlight upload notes | |
while getopts "m:" opts | |
do | |
case $opts in | |
m) | |
NOTES=$OPTARG ;; | |
esac | |
done |
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 "B2DebugDrawLayer.h" | |
USING_NS_CC; | |
B2DebugDrawLayer *B2DebugDrawLayer::create(b2World *pB2World, float pPtmRatio) | |
{ | |
B2DebugDrawLayer *pRet = new B2DebugDrawLayer(pB2World, pPtmRatio); | |
if (pRet && pRet->init()) { | |
pRet->autorelease(); | |
return pRet; |
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
#import <UIKit/UIKit.h> | |
@interface GestureView : UIView <UIGestureRecognizerDelegate> | |
@end |
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
-keep public class com.activeandroid.** { *; } | |
-keep public class * extends com.activeandroid.Model | |
-keepattributes *Annotation* |