Skip to content

Instantly share code, notes, and snippets.

Avatar
👨‍💻
Coding stuff

Frederik Wallner fwal

👨‍💻
Coding stuff
View GitHub Profile
@fwal
fwal / macinit.sh
Last active Jan 11, 2019
My setup script for new macs
View macinit.sh
#! /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 Oct 22, 2014
Simple script for checking if certain commands are installed and prompt the user to install them if not
View setup.sh
#! /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 Nov 20, 2013
A simple post processor for copying files from the assets/data folder to the player data folder in Unity3D
View DataCopyProcessor.cs
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 Nov 20, 2013
A way of logging to the iOS console from Unity3D
View DebugFunctions.c
#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 Dec 16, 2015
A simple script for (re)signing android apk's
View apksign.sh
#!/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 Oct 10, 2012 — forked from mediabounds/floatsign.sh
A small bash script to re-sign iOS applications.
View floatsign.sh
# !/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 Oct 10, 2012 — forked from adamgit/gist:3705459
Automatically create cross-platform (simulator + device) static libraries for Objective C / iPhone / iPad
View gist:3864958
#
# 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: