Skip to content

Instantly share code, notes, and snippets.

View webthingee's full-sized avatar

Sean Lange webthingee

View GitHub Profile
@a7madgamal
a7madgamal / dark.md
Last active July 14, 2023 04:00
Dark mode for Slack on MacOS
@t0chas
t0chas / CustomEditorBase.cs
Last active September 2, 2024 06:54
Default Custom Inspector-Editor for Unity3D with ReorderableLists for arrays handling
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
{
@genedelisa
genedelisa / AudioPlayer
Last active January 20, 2017 10:16
Swift AVAudioPlayer
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() {
@marcusmoller
marcusmoller / gist:6622766
Last active November 17, 2019 15:58
A small sprite combiner written in shell. Used on: http://opengameart.org/content/700-sprites
#!/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
@q0rban
q0rban / gitosnap.sh
Created November 16, 2012 16:03
Monosnap/Github Shell Script
#!/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.