Skip to content

Instantly share code, notes, and snippets.

@totallyRonja
totallyRonja / MovingParticleContext.cs
Last active December 25, 2022 07:53
This script allows you to display movement of particle systems without them moving for tweaking them in the editor. This script is CC0, but I'd be happy if you credit me as Ronja(https://twitter.com/totallyRonja) and maybe give me some money for what I do (https://www.patreon.com/RonjaTutorials) (https://ko-fi.com/ronjatutorials)
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using UnityEngine;
using UnityEditor;
using UnityEditor.EditorTools;
// Tagging a class with the EditorTool attribute and no target type registers a global tool. Global tools are valid for any selection, and are accessible through the top left toolbar in the editor.
[EditorTool("Moving Particle Context")]
@kylef
kylef / images.py
Last active December 21, 2015 13:59
Search the current directory for unused images. Useful for finding leftover assets from files which exist in Xcode project or in your repository.
# This simple python utility crawls the current directory and finds all images.
# It will then search the directory for files using these images and also mark
# any xcode projects which include these images.
#
# Allowing you to easily find images which are no longer used (or even images
# included in xcode and not used).
#
# Usage, cd into your repository and then run:
#
# curl https://gist.github.com/kylef/6316920/raw/images.py -# | python -
@Marlunes
Marlunes / hide_status_bar
Created July 16, 2013 07:54
FORCE HIDE STATUS BAR FOR IOS 7 AND 6
//viewDidload
if ([self respondsToSelector:@selector(setNeedsStatusBarAppearanceUpdate)]) {
// iOS 7
[self prefersStatusBarHidden];
[self performSelector:@selector(setNeedsStatusBarAppearanceUpdate)];
} else {
// iOS 6
[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationSlide];
}
@flarb
flarb / AssetGPULoader.cs
Created July 22, 2012 19:06
Unity3d GPU Pre-loader
using UnityEngine;
using System.Collections;
using System;
using System.Collections.Generic;
public class AssetGPULoader : MonoBehaviour {
public Camera activeCamera;
RenderTexture _rt;
@p01
p01 / LICENSE.txt
Last active May 23, 2024 13:46 — forked from 140bytes/LICENSE.txt
Sudoku Solver in 140bytes
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Mathieu 'p01' Henri - http://www.p01.org/releases/
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@kylebarrow
kylebarrow / example.html
Created June 23, 2011 06:30
Prevent links in standalone web apps opening Mobile Safari
<!DOCTYPE html>
<head>
<title>Stay Standalone</title>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<script src="stay_standalone.js" type="text/javascript"></script>
</head>
<body>
<ul>
<li><a href="http://google.com/">Remote Link (Google)</a></li>