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
/** | |
* <b>Helper class to print any object you want</b> | |
*/ | |
public class PrintMe { | |
static StringBuilder result; | |
static String newLine = System.getProperty("line.separator"); | |
static ConcurrentLinkedQueue<Object> objects = new ConcurrentLinkedQueue<Object>(); | |
private PrintMe() { | |
} |
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
Shader "Custom/BasicGradient" | |
{ | |
Properties | |
{ | |
_TopColor ("Top Color", Color) = (1, 1, 1, 1) | |
_BottomColor ("Bottom Color", Color) = (1, 1, 1, 1) | |
_RampTex ("Ramp Texture", 2D) = "white" {} | |
} | |
SubShader |
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 AppKit | |
private func isTestRun() -> Bool { | |
return NSClassFromString("XCTestCase") != nil | |
} | |
if isTestRun() { | |
// This skipping setting up the app delegate | |
NSApplication.shared.run() | |
} else { |
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 DEBUG | |
extension UIWindow { | |
class var key: UIWindow { | |
let selector: Selector = NSSelectorFromString("keyWindow") | |
let result = UIWindow.perform(selector) | |
return result?.takeUnretainedValue() as! UIWindow | |
} | |
} |
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)viewDidLoad | |
{ | |
[super viewDidLoad]; | |
[[NSNotificationCenter defaultCenter] addObserver:self | |
selector:@selector(keyboardWillShow:) | |
name:UIKeyboardWillShowNotification | |
object:nil]; | |
[[NSNotificationCenter defaultCenter] addObserver:self | |
selector:@selector(keyboardWillHide:) |
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 | |
#ID='A16FF353-8441-459E-A50C-B071F53F51B7' # Xcode 6.2 | |
ID='992275C1-432A-4CF7-B659-D84ED6D42D3F' # Xcode 6.3 | |
PLIST_BUDDY=/usr/libexec/PlistBuddy | |
function add_compatibility() { | |
"$PLIST_BUDDY" -c "Add DVTPlugInCompatibilityUUIDs:10 string $2" \ | |
"$1/Contents/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
#build.gradle | |
# | |
# compile 'io.reactivex:rxandroid:1.0.1' | |
# compile 'io.reactivex:rxjava:1.0.14' | |
# compile 'io.reactivex:rxjava-math:1.0.0' | |
# compile 'com.jakewharton.rxbinding:rxbinding:0.2.0' | |
# rxjava | |
-keep class rx.schedulers.Schedulers { | |
public static <methods>; |
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
using UnityEngine; | |
using System.Collections; | |
using System.Collections.Generic; | |
public class Bezier3D : MonoBehaviour | |
{ | |
public Vector3 start = new Vector3(0, 0, 0); | |
public Vector3 end = new Vector3(1, 1, 0); | |
public Vector3 handle1 = new Vector3(0, 1, 0); | |
public Vector3 handle2 = new Vector3(1, 0, 0); |
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 | |
ADB_PATH="/Users/medyo/Library/Android/sdk/platform-tools" | |
PACKAGE_NAME="com.mobiacube.elbotola.debug" | |
DB_NAME="default.realm" | |
DESTINATION_PATH="/Users/Medyo/Desktop/" | |
NOT_PRESENT="List of devices attached" | |
ADB_FOUND=`${ADB_PATH}/adb devices | tail -2 | head -1 | cut -f 1 | sed 's/ *$//g'` | |
if [[ ${ADB_FOUND} == ${NOT_PRESENT} ]]; then | |
echo "Make sure a device is connected" | |
else |
OlderNewer