Skip to content

Instantly share code, notes, and snippets.

William Crandell CrandellWS

Block or report user

Report or block CrandellWS

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@CrandellWS
CrandellWS / Subfolder to git repo.md
Created Dec 11, 2017 — forked from korya/Subfolder to git repo.md
Convert subfolder into Git submodule
View Subfolder to git repo.md
@CrandellWS
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;
View YourClass.cs
using UnityEngine;
using UnityEngine.Networking;
public class YourClass : Player
{
[Client]
public void Addthing()
{
View Random Color Generation
public Drawable applyRandomColorToDrawable(Drawable image) {
if (image != null) {
// PorterDuffColorFilter porterDuffColorFilter = new PorterDuffColorFilter(randomColorInt(),
PorterDuffColorFilter porterDuffColorFilter = new PorterDuffColorFilter(getRandomAlphaColorInt(),
PorterDuff.Mode.SRC_ATOP);
image.setColorFilter(porterDuffColorFilter);
}
return image;
}
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) {
@CrandellWS
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
#
general:
artifacts:
- /home/ubuntu/AndroidApp/app/build/outputs/apk/
machine:
environment:
@CrandellWS
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
#
general:
artifacts:
- /home/ubuntu/your-app-name/app/build/outputs/apk/
machine:
environment:
View index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style>
.spinBtn{
position: relative;
color: rgba(255,255,255,1);
text-decoration: none;
@CrandellWS
CrandellWS / .travis.yml
Created Sep 23, 2016 — forked from mariotaku/.travis.yml
Sign and upload compiled apk to Github releases automatically using Travis CI
View .travis.yml
language: android
android:
components:
# Uncomment the lines below if you want to
# use the latest revision of Android SDK Tools
- platform-tools
- tools
# The BuildTools version used by your project
- build-tools-22.0.0
@CrandellWS
CrandellWS / DismissCancelDialogActivity.java
Created May 29, 2016
Alert Dialog Cancel Activity to send onResume event.
View DismissCancelDialogActivity.java
import android.app.Activity;
import android.os.Bundle;
/**
* Created by William on 5/29/2016.
*
* new AlertDialog.Builder(this).
*
* use:(OnClickListener){setNegativeButton, setNeutralButton, setPositiveButton}
You can’t perform that action at this time.