Skip to content

Instantly share code, notes, and snippets.

View EliCDavis's full-sized avatar
👹
In another reality

Eli Davis EliCDavis

👹
In another reality
View GitHub Profile
@yyscamper
yyscamper / parseFloat.go
Created August 2, 2017 06:59
An advance ParseFloat for golang, support scientific notation, comma separated number
package main
import (
"fmt"
"math"
"strconv"
"strings"
)
func ParseFloat(str string) (float64, error) {
@ffyhlkain
ffyhlkain / ReferenceFinder.cs
Last active October 18, 2023 00:54
A reference finder for assets in a #Unity3d project.
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using UnityEditor;
using UnityEngine;
using Debug = UnityEngine.Debug;
using Object = UnityEngine.Object;
namespace FoundationEditor.Editor.ReferenceFinder
{
@tomkail
tomkail / ExtendedScriptableObjectDrawer.cs
Last active April 2, 2024 18:56
Displays the fields of a ScriptableObject in the inspector
// Developed by Tom Kail at Inkle
// Released under the MIT Licence as held at https://opensource.org/licenses/MIT
// Must be placed within a folder named "Editor"
using System;
using System.Reflection;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
@akheron
akheron / smtpd_fixture.py
Last active June 30, 2021 10:26
SMTP server pytest fixture
# The SMTP server runs in a separate thread and stores sent messages in a list
#
# Usage:
#
# def test_fn(smtpd):
# host = smtpd.host
# port = smtpd.port
#
# # Run code that send email using an smtp server at host:port
#
@Hendrixer
Hendrixer / editor.css
Last active March 3, 2024 14:29
VS code custom CSS for theme
.composite-title, .composite-title, .vs-dark .monaco-workbench>.activitybar>.content {
background-color: rgba(40, 44, 52, 1) !important;
}
.tabs-container, .tab, .tab.active, .title-actions, .tablist, .tabs-container, .tabs, .composite.title {
background-color: rgba(40, 44, 52, 1) !important;
}
.tab.active, .tab {
border-right: 0px !important;
@benloong
benloong / UIDissolve.shader
Last active April 17, 2024 20:30 — forked from nukeop/dissolve.shader
Dissolve shader for Unity
Shader "UI/Dissolve"
{
Properties
{
[PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {}
_Color ("Tint", Color) = (1,1,1,1)
_StencilComp ("Stencil Comparison", Float) = 8
_Stencil ("Stencil ID", Float) = 0
_StencilOp ("Stencil Operation", Float) = 0
@Reedbeta
Reedbeta / cool-game-programming-blogs.opml
Last active December 29, 2023 10:02
List of cool blogs on game programming, graphics, theoretical physics, and other random stuff
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>Graphics, Games, Programming, and Physics Blogs</title>
</head>
<body>
<outline text="Tech News" title="Tech News">
<outline type="rss" text="Ars Technica" title="Ars Technica" xmlUrl="http://feeds.arstechnica.com/arstechnica/index/" htmlUrl="https://arstechnica.com"/>
<outline type="rss" text="Polygon - Full" title="Polygon - Full" xmlUrl="http://www.polygon.com/rss/index.xml" htmlUrl="https://www.polygon.com/"/>
<outline type="rss" text="Road to VR" title="Road to VR" xmlUrl="http://www.roadtovr.com/feed" htmlUrl="https://www.roadtovr.com"/>
@nemotoo
nemotoo / .gitattributes
Last active May 2, 2024 18:33
.gitattributes for Unity3D with git-lfs
## Unity ##
*.cs diff=csharp text
*.cginc text
*.shader text
*.mat merge=unityyamlmerge eol=lf
*.anim merge=unityyamlmerge eol=lf
*.unity merge=unityyamlmerge eol=lf
*.prefab merge=unityyamlmerge eol=lf
@hawkins
hawkins / git-php-webhook.php
Last active April 25, 2022 13:30 — forked from marcelosomers/git-php-webhook.php
A basic webhook for deploying updates to repos on Github to your local server
<?php
/**
* This script is for easily deploying updates to Github repos to your local server. It will automatically git clone or
* git pull in your repo directory every time an update is pushed to your $BRANCH (configured below).
*
* Read more about how to use this script at http://behindcompanies.com/2014/01/a-simple-script-for-deploying-code-with-githubs-webhooks/
*
* INSTRUCTIONS:
* 1. Edit the variables below
* 2. Upload this script to your server somewhere it can be publicly accessed
@jhnns
jhnns / git-pr
Last active March 15, 2021 07:50
Git custom command to quickly checkout pull-requests from different origins as described in https://help.github.com/articles/checking-out-pull-requests-locally. Place this file somewhere in your path and git will run it everytime you type `git pr ...`
#!/bin/bash
if [ -z "$1" ]; then
echo "Usage: git pr [clean] [<remote>] <id-or-url>"
echo ""
echo "Examples:"
echo "git pr 42 --> git fetch origin pull/42/head:pr/origin/42"
echo "git pr upstream 42 --> git fetch upstream pull/42/head:pr/upstream/42"
echo "git pr https://github.com/peerigon/phridge/pull/1 --> git fetch https://github.com/peerigon/phridge.git pull/1/head:pr/peerigon/phridge/1"
echo "git pr clean --> Deletes all branches that match pr/*/* and pr/*/*/*"