Skip to content

Instantly share code, notes, and snippets.

@jacobmoncur
jacobmoncur / AuthenticationTest.kt
Created July 30, 2015 06:54
Kotlin + Junit test class
import org.junit.Assert
import org.junit.Test as test
public class AuthenticationTest {
test public fun login() {
Assert.assertTrue(1 == 1)
}
@jacobmoncur
jacobmoncur / build.gradle
Created July 30, 2015 06:52
Kotlin + Junit build.gradle
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "com.****.*****"
minSdkVersion 16
self.tableView.beginUpdates()
self.tableView.deleteRowsAtIndexPaths([indexPath], withRowAnimation:.Fade)
self.tableView.endUpdates()
@jacobmoncur
jacobmoncur / siri-speaks-gif
Created May 21, 2015 03:21
How to say GIF (according to siri)
let string = "This is how you say GIF."
let utterance = AVSpeechUtterance(string: string)
utterance.voice = AVSpeechSynthesisVoice(language: "en-US")
utterance.rate = 0.15
utterance.pitchMultiplier = 1.2
utterance.preUtteranceDelay = 0.2
utterance.postUtteranceDelay = 0.2
let synthesizer = AVSpeechSynthesizer()
synthesizer.speakUtterance(utterance)
@jacobmoncur
jacobmoncur / gist:8587185
Created January 23, 2014 21:28
Gradle file for getting maven dependencies hosted on private github repo
repositories {
mavenCentral()
maven {
url = 'https://github.com/github-username/github-project/raw/master'
credentials {
username 'my-username'
password 'my-password'
}
}
}
@jacobmoncur
jacobmoncur / index.html
Created July 26, 2012 04:26
A web page created at CodePen.io.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Tiles &middot; CodePen</title>
<!--
Copyright (c) 2012 jacobmoncur, http://codepen.io/jacobmoncur
Permission is hereby granted, free of charge, to any person obtaining