Skip to content

Instantly share code, notes, and snippets.

@ZevEisenberg
ZevEisenberg / resetAllSimulators.sh
Last active November 30, 2022 09:27
Reset all iOS simulators with this one weird trick
osascript -e 'tell application "iOS Simulator" to quit'
osascript -e 'tell application "Simulator" to quit'
xcrun simctl erase all
@pburtchaell
pburtchaell / styles.css
Last active February 25, 2024 12:24
VH and VW units can cause issues on iOS devices. To overcome this, create media queries that target the width, height, and orientation of iOS devices.
/**
* VH and VW units can cause issues on iOS devices: http://caniuse.com/#feat=viewport-units
*
* To overcome this, create media queries that target the width, height, and orientation of iOS devices.
* It isn't optimal, but there is really no other way to solve the problem. In this example, I am fixing
* the height of element `.foo` —which is a full width and height cover image.
*
* iOS Resolution Quick Reference: http://www.iosres.com/
*/
@norio-nomura
norio-nomura / How I stream from iPad to Twitch and Ustream.md
Last active November 20, 2020 18:18
How I stream from iPad to Twitch and Ustream.

How I stream from iPad to Twitch and Ustream.

I'm broadcasting my iPad game playing on Twitch.tv and Ustream.tv.

I'm using following hardwares.

  • Playing Game: iPad 3 w/ iOS 7.1.2
  • Broadcasting to Twitch: MacBook Air Mid 2011 w/ OS X 10.9

I'm using following softwares on Mac.

@patriciogonzalezvivo
patriciogonzalezvivo / GLSL-Noise.md
Last active May 16, 2024 21:20
GLSL Noise Algorithms

Please consider using http://lygia.xyz instead of copy/pasting this functions. It expand suport for voronoi, voronoise, fbm, noise, worley, noise, derivatives and much more, through simple file dependencies. Take a look to https://github.com/patriciogonzalezvivo/lygia/tree/main/generative

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
@mikeash
mikeash / runtime-class.m
Created November 22, 2013 16:46
Creating a usable class purely at runtime using the Objective-C runtime APIs.
// clang -fobjc-arc -framework Foundation runtime-class.m
#import <Foundation/Foundation.h>
#import <objc/runtime.h>
@interface Person : NSObject
- (id)initWithFirstName: (NSString *)firstName lastName: (NSString *)lastName age: (NSUInteger)age;
@mtowers
mtowers / README.md
Last active February 24, 2022 17:19
Google Analytics Website Visitor Count Widget for Dashing with OAuth2 Authentication
@jimfleming
jimfleming / UnityDiffuseLightmap.shader
Last active June 21, 2023 00:44
Example depicting applying Unity lightmapping data to a simple diffuse shader.
Shader "Diffuse Lightmap" {
Properties {
_MainTex ("Texture 1", 2D) = "white" {}
}
SubShader {
Tags { "RenderType" = "Opaque" }
Pass {
@fabiofl
fabiofl / gist:5873100
Created June 27, 2013 00:41
Clear Mac OS X's icon cache.
sudo find /private/var/folders/ -name com.apple.dock.iconcache -exec rm {} \;
@willurd
willurd / web-servers.md
Last active May 17, 2024 05:43
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@benui-dev
benui-dev / OrderTester.cs
Created May 17, 2013 06:29
Unity order tester. Comment out lines you don't care about. Update etc. will be especially noisy.
using UnityEngine;
using System.Collections;
public class OrderTester : MonoBehaviour {
void Update() { Debug.Log("Update()"); }
void LateUpdate() { Debug.Log("LateUpdate()"); }
void FixedUpdate() { Debug.Log("FixedUpdate()"); }
void Awake() { Debug.Log("Awake()"); }
void Start() { Debug.Log("Start()"); }
void Reset() { Debug.Log("Reset()"); }