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
license: apache-2.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
package main | |
import ( | |
"fmt" | |
"io/ioutil" | |
"net/http" | |
) | |
func main() { | |
url := "https://api.ipify.org?format=text" // we are using a pulib IP API, we're using ipify here, below are some others | |
// https://www.ipify.org | |
// http://myexternalip.com |
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
//Place this script inside your application module build.gradle | |
//It will create a new task(s) based on your application variants within (run) group | |
//sample: ./gradlew installRunDebug | |
//sample: ./gradlew installRunStagDebug | |
project.afterEvaluate { | |
android.applicationVariants.all { variant -> | |
task "installRun${variant.name.capitalize()}"(type: Exec, dependsOn: "install${variant.name.capitalize()}", group: "run") { | |
commandLine = ["adb", "shell", "monkey", "-p", variant.applicationId + " 1"] | |
doLast { |
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 UnityEngine; | |
using System.Collections; | |
[ExecuteInEditMode] | |
public class NormalEditor : BaseBehaviour | |
{ | |
Mesh m_mesh; | |
public Mesh Mesh { get { return m_mesh; } } | |
[SerializeField] |
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
/// <summary>Silly convenience initializer for creating Vs tasks with a dictionary; | |
/// can use <code>new Perf { { "task1", n => whatever }, {"task2", n => bar}...}.Vs()</code> | |
/// <para>see http://stackoverflow.com/a/14000325/1037948 </para> | |
/// </summary> | |
/// <remarks>Doesn't automatically call <see cref="Vs"/> because...</remarks> | |
public class Perf : Dictionary<string, Action<int>> {} | |
/// <summary>Silly convenience initializer for creating Vs tasks with a dictionary that can also provides some output; | |
/// can use <code>new Perf<T> { { "task1", n => whatever }, {"task2", n => bar}...}.Vs()</code> | |
/// <para>see http://stackoverflow.com/a/14000325/1037948 </para> |