Skip to content

Instantly share code, notes, and snippets.

View efranford's full-sized avatar

Elliot Franford efranford

View GitHub Profile
@efranford
efranford / LinqAllComparisonExample.cs
Last active October 18, 2021 03:13
LinqAllComparisonExample
using System.Collections;
using System.Collections.Generic;
using System.Text;
using UnityEngine;
using System.Linq;
public class LinqAllComparisonExample : MonoBehaviour
{
void Start()
{
@efranford
efranford / init.el
Last active November 30, 2016 03:44
My emacs init.el. I'll try to keep it updated :)
;;; init.el --- Satisfy flycheck
;;; Commentary:
;;; Code:
;;;;
;;;; cygwin support
;;;;
;; Sets your shell to use cygwin's bash, if Emacs finds it's running
;; under Windows and c:\cygwin exists. Assumes that C:\cygwin\bin is
@efranford
efranford / GetHighestTierForSummonerById.cs
Created February 3, 2014 05:05
Gets the highest tier a summoner has achieved in any game mode
public int GetHighestTier(int summonerId)
{
var leagues = EF.RiotApi.Client.API.LeagueApi.Instance.GetLeagueBySummonerAsync(summonerId).Result;
int summoner1Tier = -1;
foreach (var league in leagues)
{
var summoner1LeagueVar = league.Value;
if (summoner1LeagueVar.Tier.Contains("BRONZE"))
{
summoner1Tier = 1;
@efranford
efranford / SummonerLeagueInfo.cs
Last active August 29, 2015 13:55
A simple program that pulls down the summoner information and displays their league info
using EF.RiotApi.Dto.League;
using EF.RiotApi.Dto.Summoner;
using EF.RiotApi.WebRequestResults;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace EF.RiotApi.Examples
@efranford
efranford / ObjectDictionary.cs
Created December 9, 2012 15:21
Unity3D: Class that behaves like a Dictionary<K, V>, but can still be serialized and edited by the Unity Editor.
// Copyright (c) 2012 Calvin Rien
// http://the.darktable.com
//
// This software is provided 'as-is', without any express or implied warranty. In
// no event will the authors be held liable for any damages arising from the use
// of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it freely,
// subject to the following restrictions:
@efranford
efranford / DestroyAfterTime.cs
Created November 7, 2012 05:02
Scripts for the simple HP and Mana Potion exmple
using UnityEngine;
using System.Collections;
// Destroys the game object it is attached to after the given timeframe
public class DsetroyAfterTime : MonoBehaviour
{
public float DestoryAfterTime = 1.0f;
void Start ()
{
@efranford
efranford / EMedia.h
Created February 26, 2012 02:46
Enhanced Sprites for Sparrow Framework
//
// EMedia.h
// Extended Media
//
// Created by Elliot Franford on 1/16/12.
// Copyright (c) 2012 Abandon Hope Games, LLC. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "SPStage.h"