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
// | |
// See : https://docs.google.com/document/d/1PCqlBTPToO908mkeOTRGFlFk1HXY_N1zYsNJtaZdUQA/preview | |
// | |
#if UNITY_2017_2 | |
using UnityEngine.XR; | |
#else | |
using UnityEngine.VR; | |
using XRDevice = UnityEngine.VR.VRDevice; | |
using XRStats = UnityEngine.VR.VRStats; | |
using XRSettings = UnityEngine.VR.VRSettings; |
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
AVPlayerItemVideoOutput *videoOutput = [[AVPlayerItemVideoOutput alloc] initWithPixelBufferAttributes:pixelBufferAttributes]; | |
videoOutput.suppressesPlayerRendering = YES; | |
// Do this action once your player item is ready | |
AVPlayerItem *currentItem = self.player.currentItem; | |
[currentItem addOutput:videoOutput]; |
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
id<MTLBlitCommandEncoder> blit = [currentCommandBuffer blitCommandEncoder]; | |
[blit copyFromTexture:internalTexture sourceSlice:0 sourceLevel:0 sourceOrigin:MTLOriginMake(0, 0, 0) sourceSize:region.size toTexture:externalTexture destinationSlice:0 destinationLevel:0 destinationOrigin:MTLOriginMake(0, 0, 0)]; | |
[blit generateMipmapsForTexture:externalTexture]; | |
[blit endEncoding]; |
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
curl -s "http://www.moviesoundclips.net/download.php?id=2091&ft=mp3" > /tmp/x.mp3 && afplay /tmp/x.mp3 && rm /tmp/x.mp3 |
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
# | |
# Dont forget to call ~/.bashrc in your ~/.profile script | |
# | |
export CLICOLOR=1 | |
alias ll='ls -l' | |
alias la='ls -A' | |
alias vi='vim' | |
alias l='ls -CF' | |