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
// The trick is to link the DeviceSupport folder from the beta to the stable version. | |
// Updated on Jan 24th, 2017 for Xcode 8.3b1 | |
ln -s /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/10.3\ \(14E5230d\)/ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport | |
// Then restart Xcode and reconnect your devices. You will need to do that for every beta of future iOS versions | |
// sudo needed if you run the Mac App Store version. Always download the dmg instead... you'll thank me later :) |
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 ExampleUnitTest { | |
private final String xterRegex = "[;\\\\:*?\\\"<>|&']"; | |
private final String alphanumericRegex = "^[a-zA-Z0-9]*$"; | |
@Test | |
public void addition_isCorrect() throws Exception { | |
System.out.println("===================================="); | |
//System.out.println("+".matches("[^A-Za-z0-9]")); | |
System.out.println(acceptedPattern("They've")); |
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
@Reusable | |
public class Migration implements RealmMigration | |
{ | |
private Map<Integer, Provider<VersionMigration>> versionMigrations; | |
@Inject | |
Migration (Map<Integer, Provider<VersionMigration>> versionMigrations) | |
{ | |
this.versionMigrations = versionMigrations; | |
} |
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
signingConfigs { | |
debug { | |
print(file(keystoreProperties['storeFile'])) | |
keyAlias keystoreProperties['keyAlias'] | |
keyPassword keystoreProperties['keyPassword'] | |
storeFile file(keystoreProperties['storeFile']) | |
storePassword keystoreProperties['storePassword'] | |
} | |
release { |
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
buildscript { | |
fabric ... | |
} | |
apply plugin: 'com.android.application' | |
apply plugin: 'io.fabric' | |
repositories { | |
maven { url 'https://maven.fabric.io/public' } | |
} |
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
FROM ubuntu:latest | |
RUN cd /opt | |
RUN mkdir android-sdk-linux && cd android-sdk-linux/ | |
RUN apt-get update -qq \ | |
&& apt-get install -y openjdk-8-jdk \ | |
&& apt-get install -y wget \ | |
&& apt-get install -y expect \ |
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
// Every jenkins file should start with either a Declarative or Scripted Pipeline entry point. | |
node { | |
//Utilizing a try block so as to make the code cleaner and send slack notification in case of any error | |
try { | |
//Call function to send a message to Slack | |
notifyBuild('STARTED') | |
// Global variable declaration | |
def project = 'sa-android' | |
def appName = 'Sample App' |
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
# install openjdk | |
sudo apt-get install openjdk-7-jdk | |
# download android sdk | |
wget http://dl.google.com/android/android-sdk_r24.2-linux.tgz | |
tar -xvf android-sdk_r24.2-linux.tgz | |
cd android-sdk-linux/tools | |
# install all sdk packages |
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
sudo aptitude -y install nginx | |
cd /etc/nginx/sites-available | |
sudo rm default | |
sudo cat > jenkins | |
upstream app_server { | |
server 127.0.0.1:8080 fail_timeout=0; | |
} | |
server { | |
listen 80; |
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 io.realm; | |
import java.io.IOException; | |
import java.lang.reflect.Field; | |
import java.lang.reflect.Modifier; | |
import java.util.EnumMap; | |
import java.util.Map; | |
public class RealmUtil { |