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
* create the script | |
* add a shortcut to it in your keyboards shortcut as shown in the screenshot (http://monosnap.com/image/idkRLKyEij1DC2bstdwUmznG0ODX3S) |
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 System; | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
switch (gate) | |
{ | |
case "1": | |
Console.WriteLine("Darkness - the world of demons"); |
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
/* | |
* Copyright (c) 2011 by Twilio, Inc., all rights reserved. | |
* | |
* Use of this software is subject to the terms and conditions of | |
* the Twilio Terms of Service located at http://www.twilio.com/legal/tos | |
*/ | |
package com.twilio.ipmessaging.util; | |
import java.io.IOException; |
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 make_call | |
client = Twilio::REST::Client.new your-sid, your-token | |
call = client.account.calls.create( | |
:from => your-twilio-number, # From your Twilio number | |
:to => your-real-number, # To any number | |
# Fetch instructions from this URL when the call connects | |
:url => 'your-ngrok-url' | |
) |
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
// Add nice events to unit test results | |
// Just put it on the top level of your gradle module | |
tasks.matching {it instanceof Test}.all { | |
testLogging.events = ["failed", "passed", "skipped"] | |
} |
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 System; | |
using System.Globalization; | |
using System.Linq; | |
using System.Web.Mvc; | |
using Twilio; | |
using Twilio.TwiML; | |
using Twilio.TwiML.Mvc; | |
namespace TwilioBaseApp.Controllers | |
{ |
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 Note extends RealmObject { | |
public String mText | |
} | |
Note note = new Note(); note.mText = "My awesome note"; | |
Realm realm = Realm.getDefaultInstance(); | |
realm.beginTransaction(); | |
realm.copyToRealm(note) | |
realm.commitTransaction(); |
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 { | |
repositories { | |
jcenter() | |
} | |
dependencies { | |
classpath 'com.android.tools.build:gradle:2.1.2' | |
classpath 'io.realm:realm-gradle-plugin:1.1.1' | |
} | |
} | |
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
apply plugin: 'com.android.application' | |
apply plugin: 'realm-android' | |
// other stuff commented out for brevity | |
dependencies { | |
compile fileTree(dir: 'libs', include: ['*.jar']) | |
testCompile 'junit:junit:4.12' | |
compile 'com.android.support:appcompat-v7:24.1.1' | |
compile 'com.android.support:design:24.1.1' |
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
<android.support.design.widget.FloatingActionButton | |
android:id="@ id/fab" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:layout_gravity="bottom|end" | |
android:layout_margin="@dimen/fab_margin" | |
android:src="@android:drawable/ic_input_add" /> |