Skip to content

Instantly share code, notes, and snippets.


William Crandell CrandellWS

View GitHub Profile
View index.html
<!DOCTYPE html>
<html lang="en">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
position: relative;
color: rgba(255,255,255,1);
text-decoration: none;
CrandellWS / android-19-circle.yml
Last active Feb 16, 2017 — forked from donnfelker/android-19-circle.yml
Sample CircleCI Configuration For an Android App
View android-19-circle.yml
# Build configuration for Circle CI
- /home/ubuntu/your-app-name/app/build/outputs/apk/
View Android set Text By Width
* Sets the text size for a Paint object so a given string of text will be a
* given width.
* @param paint the Paint to set the text size for
* @param desiredView the desired view
* @param text the text that should be that width
private static float setTextSizeByWidth(Paint paint, View desiredView,
String text) {
View Random Color Generation
public Drawable applyRandomColorToDrawable(Drawable image) {
if (image != null) {
// PorterDuffColorFilter porterDuffColorFilter = new PorterDuffColorFilter(randomColorInt(),
PorterDuffColorFilter porterDuffColorFilter = new PorterDuffColorFilter(getRandomAlphaColorInt(),
return image;
View YourClass.cs
using UnityEngine;
using UnityEngine.Networking;
public class YourClass : Player
public void Addthing()
CrandellWS / underwater.js
Created Dec 7, 2017 — forked from RichardSlater/underwater.js
Unity3d Underwater Effect
View underwater.js
//This script enables underwater effects. Attach to main camera.
//Define variables
var underwaterLevel = 7;
//The scene's default fog settings
private var defaultFog;
private var defaultFogColor;
private var defaultFogDensity;
private var defaultSkybox;
CrandellWS / Subfolder to git
Created Dec 11, 2017 — forked from korya/Subfolder to git
Convert subfolder into Git submodule
View Subfolder to git
CrandellWS / circle.yml
Last active Jan 4, 2018 — forked from dazza5000/circle.yml
CircleCI Android Configuration Template - circle.yml
View circle.yml
# Build configuration for Circle CI
- /home/ubuntu/AndroidApp/app/build/outputs/apk/
CrandellWS / Android Privacy Policy Template
Created Feb 9, 2018 — forked from alphamu/Android Privacy Policy Template
A template for creating your own privacy policy for Android apps. Look for "[" and "<!--" to see where you need to edit this app in order to create your own privacy olicy.
View Android Privacy Policy Template
<h2>Privacy Policy</h2>
<p>[Individual or Company Name] built the [App Name] app as a [open source | free | freemium | ad-supported | commercial] app. This SERVICE is provided by [Individual or company name] [at no cost] and is intended
for use as is.</p>
<p>This page is used to inform website visitors regarding [my|our] policies with the collection, use, and
disclosure of Personal Information if anyone decided to use [my|our] Service.</p>
<p>If you choose to use [my|our] Service, then you agree to the collection and use of information in
relation with this policy. The Personal Information that [I|we] collect are used for providing and
improving the Service. [I|We] will not use or share your information with anyone except as described
CrandellWS / DynamicLayoutGroup.cs
Created Feb 15, 2018 — forked from robertwahler/DynamicLayoutGroup.cs
Unity 3D layout group switches orientation automatically between landscape and portrait layouts so it either acts like a VerticalLayoutGroup or a HorizontalLayoutGroup.
View DynamicLayoutGroup.cs
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.EventSystems;
using System.Collections;
using System.Collections.Generic;
using SDD.Extensions;
using SDD.Events;
namespace SDD.UI {