bonus tip: for more darkness > https://darkreader.org/
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 UnityEditorInternal; | |
using System.Collections.Generic; | |
using UnityEditor.AnimatedValues; | |
[CustomEditor(typeof(UnityEngine.Object), true, isFallback = true)] | |
[CanEditMultipleObjects] | |
public class CustomEditorBase : Editor | |
{ |
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
class Sound : NSObject { | |
/// The player. | |
var avPlayer:AVAudioPlayer! | |
/** | |
Uses AvAudioPlayer to play a sound file. | |
The player instance needs to be an instance variable. Otherwise it will disappear before playing. | |
*/ | |
func readFileIntoAVPlayer() { |
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
#!/bin/sh | |
for f in *.gif | |
do | |
short=${f:0:4} | |
if ls $short".png" &> /dev/null; then | |
echo "file exists" | |
else | |
montage -tile x1 -geometry +0+0 -background none $short*.gif $short.png | |
convert $short.png -transparent white $short.png |
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
#!/usr/bin/env sh | |
# https://gist.github.com/4088499 | |
FIND="^monosnap.com\/image\/\([a-zA-Z0-9]*\)" | |
REPLACE="![](https:\/\/api.monosnap.com\/image\/download\?id=\1)" | |
pbpaste | | |
# Different versions of monosnap have this formatted differently, so we grep | |
# first for just what we need. | |
grep -o monosnap.com/image/[a-zA-Z0-9]* | | |
# Grab the current cliboard contents and do our replacement. |