Skip to content

Instantly share code, notes, and snippets.

View dimmduh's full-sized avatar
🎮
Learning Unity

Dmitrii Dukhnich dimmduh

🎮
Learning Unity
View GitHub Profile
@Sebring
Sebring / HtmlTextView.java
Created September 4, 2015 09:12
HtmlTextView - Android TextView to in databinding where content is HTML
import android.content.Context;
import android.text.Html;
import android.text.method.LinkMovementMethod;
import android.util.AttributeSet;
import android.widget.TextView;
public class HtmlTextView extends TextView {
public HtmlTextView(Context context) {
super(context);
@Krumelur
Krumelur / GameHelper.cs
Created October 23, 2015 13:51
GameHelper for Android Google Play Game Services with new ApiClient
using System;
using Android.Gms.Common;
using Android.Gms.Common.Apis;
using Android.Gms.Games.Achievement;
using Android.Gms.Games.LeaderBoard;
using Android.Gms.Games;
using Android.App;
using Android.Content;
using Android.Views;
using Java.Interop;
@phucnh
phucnh / android_pkg_name_validate.js
Created October 30, 2015 08:21 — forked from rishabhmhjn/android_pkg_name_validate.js
Regex to validate Android Package Name
var pattern = /^[a-z][a-z0-9_]*(\.[a-z0-9_]+)+[0-9a-z_]$/i;
[
"me.unfollowers.droid",
"me_.unfollowers.droid",
"me._unfollowers.droid",
"me.unfo11llowers.droid",
"me11.unfollowers.droid",
"m11e.unfollowers.droid",
"1me.unfollowers.droid",
Shader "Name" {
Properties {
name ("display name", Range (min, max)) = number
name ("display name", Float) = number
name ("display name", Int) = number
name ("display name", Color) = (number,number,number,number)
name ("display name", Vector) = (number,number,number,number)
@yasuyuki-kamata
yasuyuki-kamata / AdMobMediationTest.cs
Created April 13, 2016 05:39
[Sample] UnityAds with AdMobMediation for Unity C#
using UnityEngine;
using System.Collections;
using GoogleMobileAds.Api;
using UnityEngine.Events;
public class AdMobMediationTest : MonoBehaviour
{
[SerializeField]
string adUnitId_Android = "ca-app-pub-3504169427024836/4346441108";
[SerializeField]
@dddnuts
dddnuts / Fastfile
Created June 4, 2016 10:39
Build ipa from Unity project with fastlane
fastlane_version "1.94.0"
default_platform :ios
platform :ios do
desc "Run Unity Editor tests"
lane :test_unit do
unity(
run_editor_tests: true
)
server {
listen 80 default_server deferred;
server_name what-shong.com;
root /root/what-song-frontend/current;
access_log /root/what-song-frontend/current/nginx.access.log;
error_log /root/what-song-frontend/current/nginx.error.log info;
location / {
proxy_pass http://104.156.56.109:3000;
@zhenlinyang
zhenlinyang / AndroidSignCheck.cs
Created December 6, 2016 02:48
AndroidSignCheck
using UnityEngine;
public static class AndroidSignCheck
{
private const string c_PackageName = "com.yangzhenlin.unitydemo";
public static byte[] GetSignature()
{
//Player = new UnityPlayer();
AndroidJavaClass Player = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
@keithmorris
keithmorris / drive-format-ubuntu.md
Last active May 1, 2025 14:39
Partition, format, and mount a drive on Ubuntu
@erlangparasu
erlangparasu / NetworkUtilsAcceptSelfSignedSslCert.java
Last active December 6, 2020 10:59
OkHttp Accept Self-signed SSL Certificate
// package ... ;
/**
* Copyright (C) 2014 Square, Inc.
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0