Skip to content

Instantly share code, notes, and snippets.

@v01pe
v01pe / slack-files-downloader.sh
Last active December 13, 2024 14:48 — forked from adamwulf/slack-files-downloader.sh
Download all files from a Slack workspace export folder.
#!/bin/bash
#
# This script will browse a Slack export folder and download all files in a new /export folder
#
# HOW TO:
# 1. As a Workspace admin, download an export of your Slack history (https://www.slack.com/services/export)
# 2. Make sure you have jq installed (https://stedolan.github.io/jq/)
# 3. Place this file at the root of your Slack export folder, next to channels.json
# 4. Run `bash slack-files-downloader.sh` in your terminal
#
@v01pe
v01pe / BuildHandler.cs
Created August 4, 2021 10:30
Build pre- and post-processing. Workaround for missing build canceled delegate.
using System;
using UnityEditor;
using UnityEditor.Build;
using UnityEngine;
using Object = UnityEngine.Object;
[InitializeOnLoad]
public class BuildHandler : MonoBehaviour
{
/// <summary>
@v01pe
v01pe / unity_templates.sh
Created October 23, 2018 13:34
Replace and add custom script templates for Unity
#!/bin/bash
#locating unity folder
if [ "$#" -gt 0 ]
then
unityFolder=${1%/}
else
unityFolder="/Applications/Unity"
fi
@v01pe
v01pe / DynamicProfilerSamplesSize.cs
Created December 1, 2016 15:39
In Unity add a menu item that toggles between dynamic and the default profiler sample size.
using UnityEngine;
using UnityEditor;
[InitializeOnLoad]
public static class DebugMenu
{
private static int defaultMaxNumberOfSamplesPerFrame = -1;
private static bool dynamicProfilerSamplesSize = false;
private const string toggleDynamicProfilerSamplesSizeName = "Debug/Dynamic Profiler Sample Size";
@v01pe
v01pe / Example.cs
Last active November 14, 2022 18:03
A relative simple way to get the instance object from a custom property drawer that draws a serialized class inside a component
using UnityEngine;
using System.Collections;
public class Example : MonoBehaviour
{
public ExampleClass example;
void Start() {}
void Update() {}
}
@v01pe
v01pe / gitgit.sh
Created April 14, 2015 10:11
Using git on the command line, but tired of typing `git` in front of every command? Use this little script.
#!/bin/bash
lastcmd=""
while [ true ]; do
read -r -e -p "> git " gitcmd
if [ "$gitcmd" != "" ] && [ "$gitcmd" != "$lastcmd" ]; then
lastcmd=$gitcmd
history -s "$gitcmd"
fi
if [ "$gitcmd" == "exit" ]; then