Skip to content

Instantly share code, notes, and snippets.

View fwal's full-sized avatar
👨‍💻
Coding stuff

Frederik Wallner fwal

👨‍💻
Coding stuff
View GitHub Profile
@fwal
fwal / macinit.sh
Last active January 11, 2019 13:32
My setup script for new macs
#! /bin/sh
# PUBLIC DOMAIN
#
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled
# binary, for any purpose, commercial or non-commercial, and by any
# means.
@fwal
fwal / setup.sh
Created October 22, 2014 07:30
Simple script for checking if certain commands are installed and prompt the user to install them if not
#! /bin/bash
function prompt {
while true; do
read -p "$1 is not installed. Do you wish to install it? [y/n]:" yn
case $yn in
[Yy]* ) return 1;;
[Nn]* ) return 0;;
* ) echo "Please answer yes or no.";;
esac
@fwal
fwal / DataCopyProcessor.cs
Created November 20, 2013 12:40
A simple post processor for copying files from the assets/data folder to the player data folder in Unity3D
using UnityEngine;
using UnityEditor;
using UnityEditor.Callbacks;
using System.Collections;
using System.IO;
public class DataCopyProcessor {
[PostProcessBuild]
public static void OnPostprocessBuild(BuildTarget target, string pathToBuiltProject) {
@fwal
fwal / DebugFunctions.c
Created November 20, 2013 07:57
A way of logging to the iOS console from Unity3D
#include <stdio.h>
#include <stdlib.h>
#include <asl.h>
static aslclient client;
void CloseLogToConsole()
{
asl_close(client);
}
void OpenLogToConsole()
@fwal
fwal / apksign.sh
Last active December 16, 2015 00:39
A simple script for (re)signing android apk's
#!/bin/bash
# Copyright (c) 2013 Frederik Wallner
# http://frederikwallner.com
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
@fwal
fwal / floatsign.sh
Created October 10, 2012 12:41 — forked from mediabounds/floatsign.sh
A small bash script to re-sign iOS applications.
# !/bin/bash
# Copyright (c) 2011 Float Mobile Learning
# http://www.floatlearning.com/
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
@fwal
fwal / gist:3864958
Created October 10, 2012 11:31 — forked from adamgit/gist:3705459
Automatically create cross-platform (simulator + device) static libraries for Objective C / iPhone / iPad
#
# c.f. StackOverflow question/answer here: http://stackoverflow.com/questions/3520977/build-fat-static-library-device-simulator-using-xcode-and-sdk-4
#
# Version 2.5
#
# Latest Change:
# - The "copy headers" section now respects the build setting for the location of the public headers
# - Opens the directory with the universal library after build (Can be annoying)
#
# Purpose: