Skip to content

Instantly share code, notes, and snippets.

View Novack's full-sized avatar

Novack

View GitHub Profile
@ronjouch
ronjouch / ronj-autohotkey.ahk
Created April 20, 2012 13:28
Collection of AutoHotkey scripts I use
; Variables definition
; -----------------------------------------------------------------------------
EnvGet, userProfile, USERPROFILE
Software := userProfile . "\Dropbox\software\"
; Launch or toggle program, http://lifehacker.com/5468862/create-a-shortcut-key-for-restoring-a-specific-window
; -----------------------------------------------------------------------------
ToggleWinMinimize(WindowTitle)
{
SetTitleMatchMode,2
using UnityEngine;
using System;
using System.Collections;
using System.Collections.Generic;
struct Triangle {
public int p1;
public int p2;
public int p3;
public Triangle(int point1, int point2, int point3) {
anonymous
anonymous / gist:4169590
Created November 29, 2012 14:57
Get Google Spreadsheet as PDF with customizations
function spreadsheetToPDF(key) {
var oauthConfig = UrlFetchApp.addOAuthService("spreadsheets");
var scope = "https://spreadsheets.google.com/feeds"
oauthConfig.setConsumerKey("anonymous");
oauthConfig.setConsumerSecret("anonymous");
oauthConfig.setRequestTokenUrl("https://www.google.com/accounts/OAuthGetRequestToken?scope="+scope);
oauthConfig.setAuthorizationUrl("https://accounts.google.com/OAuthAuthorizeToken");
oauthConfig.setAccessTokenUrl("https://www.google.com/accounts/OAuthGetAccessToken");
@jmcguirk
jmcguirk / PerformBuild.cs
Created March 8, 2013 01:56
Unity3D Ant Build Configuration
// C# example
using UnityEditor;
using System.IO;
using System.Collections;
using UnityEngine;
using System.Collections.Generic;
class PerformBuild
{
static string[] GetBuildScenes()
@masa795
masa795 / UnityTextures.cs
Created June 17, 2013 14:12
Unityが持っているアイコンを表示する。 Unityのバージョンによってはパスが使えなくなるかもしれないので使用時は注意。
using System;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
//Unity 4.1.5
public class UnityTextures : EditorWindow
{
@oliverheilig
oliverheilig / PointInsidePolygon.cs
Last active March 19, 2020 15:17
PointInsidePolygon
// This snippet shows how to check whether a point is
// contained in a polygon. Works for all polygons, even for
// OGC-invalid ones, corresponding to "fill mode" alternate.
// You can use this for geo-fencing or UI hit-testing.
using System;
using System.Collections.Generic;
using JSIL;
using JSIL.Meta;
public class Program
@denilsonsa
denilsonsa / url_to_drive.js
Last active December 18, 2022 18:32
Google Apps Script to upload a file from an URL directly to Google Drive.
// url_to_drive.gs
// Google Apps Script
// Allows uploading a URL directly to Google Drive.
//
// Live link:
// https://script.google.com/macros/s/AKfycbzvhbHS4hnWPVBDHjQzZHA0qWq0GR-6hY7TbYsNto6hZ0MeAFZt/exec
//
// Source-code:
// https://gist.github.com/denilsonsa/8134679
// https://script.google.com/d/1Ye-OEn1bDPcmeKSe4gb0YSK83RPMc4sZJt79SRt-GRY653gm2qVUptoE/edit
@AnomalousUnderdog
AnomalousUnderdog / DldUtil_BuiltInSkinBrowser.cs
Last active August 9, 2017 17:15
A utility script for Unity 3d: A window that takes the built-in GUI skin, and shows all the custom GUI styles inside.
using UnityEngine;
using UnityEditor;
using System.Collections;
using System.Text.RegularExpressions;
using System.IO;
public class DldUtil_BuiltInSkinBrowser : EditorWindow
{
[MenuItem("Window/Built-in Skin Browser")]
static void OpenWindow()
@kimsama
kimsama / GetAssetsOfType.cs
Last active April 12, 2017 15:43
Retrieves certain type of assets with the specified file extension at the given path.
/// <summary>
/// Used to get assets of a certain type and file extension from entire project
/// Usage:
/// UnityEngine.Object[] pagePrefabs = GetAssetsOfType("Resources/Prefabs/PAGE", typeof(GameObject), ".prefab");
/// </summary>
/// <param name="type">The type to retrieve. eg typeof(GameObject).</param>
/// <param name="fileExtension">The file extention the type uses eg ".prefab".</param>
/// <returns>An Object array of assets.</returns>
public static UnityEngine.Object[] GetAssetsOfType(string path, System.Type type, string fileExtension)
{
@kimsama
kimsama / Unity-GetAllFilesUnderSelectedFoder.cs
Last active May 8, 2024 20:22
Code snip which shows gather all files under selected folder in Unity's Project View
/// <summary>
/// Retrieves selected folder on Project view.
/// </summary>
/// <returns></returns>
public static string GetSelectedPathOrFallback()
{
string path = "Assets";
foreach (UnityEngine.Object obj in Selection.GetFiltered(typeof(UnityEngine.Object), SelectionMode.Assets))
{