This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// C# example | |
using UnityEditor; | |
using System.IO; | |
using System.Collections; | |
using UnityEngine; | |
using System.Collections.Generic; | |
class PerformBuild | |
{ | |
static string[] GetBuildScenes() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using UnityEditor; | |
using UnityEngine; | |
//Unity 4.1.5 | |
public class UnityTextures : EditorWindow | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <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) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <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)) | |
{ |
OlderNewer