![]() |
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
struct Connection { | |
void disconnected() | |
{ | |
m_connection = Disconnected(); | |
} | |
void interrupted() | |
{ | |
m_connection = std::visit(InterruptedEvent(*this), m_connection); | |
} |
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/bash | |
USER=${1:-sebble} | |
STARS=$(curl -sI https://api.github.com/users/$USER/starred?per_page=1|egrep '^Link'|egrep -o 'page=[0-9]+'|tail -1|cut -c6-) | |
PAGES=$((658/100+1)) | |
echo You have $STARS starred repositories. | |
echo |
These are the steps our team used to get Xcode 8's Automatic Signing working for our iOS app. We felt it would be valuable to share this with the community (particularly given the effort it required us to get it working). While our research yielded some valuable information from others, it wasn't as simple as it sounded. We figured that we're not alone. 😄
For reference, these were some of the resources that proved valuable to us:
- Brief, high-level summary: Code Signing in Xcode 8 by Jay Graves
- Likely the most useful, in-depth explanation: Migrating Code Signing Configurations to Xcode 8 by Samantha Marshall
These steps presume that you have some understanding of iOS code signing and familiarity w
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 a jar with source files | |
task sourcesJar(type: Jar) { | |
from android.sourceSets.main.java.srcDirs | |
classifier = 'sources' | |
} | |
task javadoc(type: Javadoc) { | |
failOnError false | |
source = android.sourceSets.main.java.sourceFiles |
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 java.io.IOException; | |
import java.net.MalformedURLException; | |
import java.net.URL; | |
import java.security.KeyManagementException; | |
import java.security.KeyStore; | |
import java.security.KeyStoreException; | |
import java.security.NoSuchAlgorithmException; | |
import javax.net.ssl.HttpsURLConnection; | |
import javax.net.ssl.SSLContext; |
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 String getTimestamp() { | |
DateTime post = new DateTime(1468973396572); | |
DateTime now = new DateTime(); | |
Period period = new Period(post, now); | |
PeriodFormatter formatter; | |
if(period.getYears() != 0){ | |
formatter = new PeriodFormatterBuilder().appendYears().appendSuffix("Y").printZeroNever().toFormatter(); | |
}else if(period.getMonths() !=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
public class Sample1 | |
{ | |
public native int intMethod(int n); | |
public native boolean booleanMethod(boolean bool); | |
public native String stringMethod(String text); | |
public native int intArrayMethod(int[] intArray); | |
public static void main(String[] args) | |
{ | |
System.loadLibrary("Sample1"); |