Skip to content

Instantly share code, notes, and snippets.

View ashblue's full-sized avatar

Ash Blue ashblue

View GitHub Profile
@Srfigie
Srfigie / .gitattributes
Created February 2, 2020 14:30 — forked from nemotoo/.gitattributes
.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
@LawJolla
LawJolla / gatsby-ssr.js
Created September 18, 2017 06:19
Apollo + Gatsby SSR
import React from 'react'
import { renderToString, renderToStaticMarkup } from 'react-dom/server'
import ApolloClient, { createNetworkInterface, } from 'apollo-client'
import { ApolloProvider, getDataFromTree } from 'react-apollo'
// Apollo Setup
const networkInterface = createNetworkInterface({
uri: process.env.GRAPHCOOL_API
})
@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;
@roylee0704
roylee0704 / dockergrep.sh
Created December 9, 2016 08:24
how to grep docker log
docker logs nginx 2>&1 | grep "127."
# ref: http://stackoverflow.com/questions/34724980/finding-a-string-in-docker-logs-of-container
@sadikaya
sadikaya / cmder-in-webstorm.md
Created November 28, 2016 06:52
Cmder inside Webstorm terminal
  1. Set an environment variable called CMDER_ROOT to your root Cmder folder (in my case C:\Program Files (x86)\Cmder). It seems to be important that this does not have quotes around it because they mess with concatenation in the init script.
  2. In your IntelliJ terminal settings, use "cmd" /k ""%CMDER_ROOT%\vendor\init.bat"" as the Shell path. The double-double-quotes are intentional, as they counteract the missing double quotes in the environment variable.
@tduarte
tduarte / publish-ghpages.md
Last active March 15, 2024 05:45
If you need to force push an subtree
git checkout master # you can avoid this line if you are in master...
git subtree split --prefix dist -b gh-pages # create a local gh-pages branch containing the splitted output folder
git push -f origin gh-pages:gh-pages # force the push of the gh-pages branch to the remote gh-pages branch at origin
git branch -D gh-pages # delete the local gh-pages because you will need it: ref
@mattiaswargren-zz
mattiaswargren-zz / ManifestInfoText.cs
Created July 6, 2016 06:39
Unity Cloud Build Manifest Info Display
using UnityEngine;
using UnityEngine.UI;
public class ManifestInfoText : MonoBehaviour
{
[System.Serializable]
public class UnityCloudBuildManifestData
{
public string scmCommitId;
@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
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class BezierCurveScript : MonoBehaviour {
public class BezierPath
{
public List<Vector3> pathPoints;
private int segments;
@shanecelis
shanecelis / CoroutineTests.cs
Last active July 15, 2022 15:03
I was curious about how one could manually drive Unity's coroutines without necessarily putting them into Unity's scheduler.
/*
CoroutineTests.cs -- Shane Celis
I was curious about how one could manually drive Unity's coroutines
without necessarily putting them into Unity's scheduler. At the
heart of it, it's really easy to manually drive them:
// Get the coroutine.
IEnumerator ienum = MyCoroutine();
// Run it until it yields.