⌘R | Run |
⌘U | Unit Test |
⌘I | Instruments Profile |
⇧⌘B | Analyze |
This file contains hidden or 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; | |
[InitializeOnLoad] | |
public class PlatformMonitor { | |
static BuildTarget cachedPlatform; | |
static PlatformMonitor() { | |
cachedPlatform = EditorUserBuildSettings.activeBuildTarget; |
This file contains hidden or 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
// | |
// | |
// DeletePlayerPrefs, created by Karlos Zafra | |
// | |
// | |
using UnityEngine; | |
using UnityEditor; | |
public class DeletePlayerPrefs |
This file contains hidden or 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
[user] | |
name = Karlos Zafra | |
email = [email protected] | |
[alias] | |
amend = !git log -n 1 --pretty=tformat:%s%n%n%b | git commit -F - --amend | |
br = branch | |
co = checkout | |
cob = checkout -b | |
continue = rebase --continue |
This file contains hidden or 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
/// | |
/// | |
/// #SCRIPTNAME#, created by Karlos Zafra | |
/// | |
////// | |
using UnityEngine; | |
using System.Collections; | |
public class #SCRIPTNAME# : MonoBehaviour |
This file contains hidden or 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
// filter collidable tiles | |
std::vector<Point> toRemove; | |
for (size_t q = 0; q < freeTileCandidates.size(); ++q) | |
{ | |
Point testTile = freeTileCandidates[q]; | |
if( this->tileIsCollidable( testTile ) ) | |
toRemove.push_back(testTile); | |
} | |
// erase filtered tiles | |
for (size_t q = 0; q < toRemove.size(); ++q) |
This file contains hidden or 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
#include <functional> | |
class EventHandler | |
{ | |
public: | |
void addHandler(std::function<void(int)> callback) | |
{ | |
fCallback = callback | |
} | |
void performCallback() |
This file contains hidden or 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
#!/bin/bash | |
f=$(pwd) | |
sips --resampleWidth 512 "${f}/${1}" --out "${f}/iTunesArtwork" | |
sips --resampleWidth 1024 "${f}/${1}" --out "${f}/iTunesArtwork@2x" | |
sips --resampleWidth 57 "${f}/${1}" --out "${f}/Icon.png" | |
sips --resampleWidth 114 "${f}/${1}" --out "${f}/[email protected]" | |
sips --resampleWidth 29 "${f}/${1}" --out "${f}/Icon-Small.png" | |
sips --resampleWidth 58 "${f}/${1}" --out "${f}/[email protected]" | |
sips --resampleWidth 50 "${f}/${1}" --out "${f}/Icon-Small-50.png" |
This file contains hidden or 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
@interface NSMutableArray (Shuffling) | |
- (void)shuffle; | |
@end |
This file contains hidden or 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
ffmpeg -i input.mp4 output.mp3 |