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
[Test] | |
public function should_verify_response():void { | |
// @see https://manage.sbs.wooga.com/docs/api/abconfig | |
// 1) Decrypt the X-SBS-Config-Signature using the public key for your SBS-ID | |
var rsa:RSAKey = PEM.readRSAPublicKey(correctKey); | |
var src:ByteArray = new ByteArray(); | |
src.writeUTFBytes(Base64.encode(correctSignature)); |
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
package klausur.spierpinski; | |
import org.jetbrains.annotations.NotNull; | |
import org.jetbrains.annotations.Nullable; | |
import javax.swing.*; | |
import java.awt.*; | |
import static javax.swing.JFrame.EXIT_ON_CLOSE; |
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 override Promise unlockAchievements (string name, double points, bool autoStart = true) | |
{ | |
var deferred = new Deferred<bool>(); | |
string format = "Unlock Achievement " + name + " with " + points; | |
deferred.OnFulfilled += (bool result) => Debug.Log(format + ": " + result); | |
deferred.OnFailed += (bool result) => Debug.Log(format + ": " + result); | |
deferred.action += () => | |
Social.ReportProgress(name, points, (bool success) => { | |
if(success) |
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 static string ToString<T>(this IEnumerable<T> list, string separator) | |
{ | |
StringBuilder sb = new StringBuilder(); | |
foreach (var obj in list) { | |
if (sb.Length > 0) { | |
sb.Append(separator); | |
} | |
sb.Append(obj); | |
} | |
return sb.ToString(); |
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 static T GetComponentByInterface<T>(this GameObject go) where T : class | |
{ | |
var components = go.GetComponents<MonoBehaviour>(); | |
foreach (var c in components) | |
{ | |
T t = c as T; | |
if (t != null) | |
return t; | |
} | |
return null; |
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
def getCommitCount() { | |
final Scanner s = new Scanner(getCommitNumberFromGit()); | |
int count = 0; | |
while (s.hasNextLine()) { | |
s.nextLine(); | |
count++; | |
} | |
return count; |
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
private void setupCrashlytics(@NotNull final Activity activity) { | |
final Crashlytics crashlytics = new Crashlytics(); | |
// hack to set fully classified version name @see gradle task.canonicalReleaseVersionName | |
try { | |
final Field versionNameField = CrashlyticsCore.class.getDeclaredField("versionName"); | |
versionNameField.setAccessible(true); | |
versionNameField.set(crashlytics.core, Build.getValue(CANONICAL_VERSION_NAME)); | |
} catch (Exception e) { | |
e.printStackTrace(); |
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
/** | |
* Format dd.MM.yy hh:mm e.g.: 24.09.15 12:26 | |
*/ | |
public static Date parseDate(final String date) { | |
final DateFormat df = new SimpleDateFormat("dd.MM.yy hh:mm"); | |
Date result = null; | |
try { | |
result = df.parse(date); |
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 android.support.annotation.IntDef; | |
import com.android.volley.Request; | |
import java.lang.annotation.Retention; | |
import java.lang.annotation.RetentionPolicy; | |
@IntDef({ | |
Request.Method.DEPRECATED_GET_OR_POST, | |
Request.Method.GET, |
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 | |
HOCKEY_API_TOKEN="" | |
HOCKEY_APP_TOKEN="" | |
APP_PATH="ci-build.apk" | |
curl \ | |
--progress-bar \ | |
-F "status=2" \ | |
-F "notify=1" \ |
OlderNewer