Skip to content

Instantly share code, notes, and snippets.

View xeophin's full-sized avatar

Kaspar manz xeophin

View GitHub Profile
@ikriz
ikriz / PostBuildTrigger.cs
Created February 21, 2014 21:56
Example PostProcessBuild Script referenced at http://www.ikriz.nl/2012/06/18/unity-post-process-mayhem/
using System.IO;
using UnityEngine;
using UnityEditor;
using UnityEditor.Callbacks;
public static class PostBuildTrigger
{
private static DirectoryInfo targetdir;
private static string buildname;
private static string buildDataDir;
@Su-Shee
Su-Shee / gist:450ccbf2f665094aae50
Last active August 29, 2015 14:23
quick & dirty vim syntax highlighting for "bad writing style" in german
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
syn case match
" indication for missing a proper subject or object 'who is doing what?'
syn keyword authorAnonym man
@leon
leon / README.md
Created February 4, 2014 09:49
angularjs $q decorator for spread

Use it like this

$q.all([ promise1, promise2 ]).then($q.spread(function (promise1Result, promise2Result) {

});

@valryon
valryon / .gitignore
Last active January 10, 2017 14:24
Unity .gitignore
# =============== #
# Unity generated #
# =============== #
Temp/
Obj/
UnityGenerated/
/Library/
# ===================================== #
# Visual Studio / MonoDevelop generated #
@tmslnz
tmslnz / apple-system-font.css
Created July 12, 2015 18:01
Specify Apple System Font in CSS
/* From http://furbo.org/2015/07/09/i-left-my-system-fonts-in-san-francisco/ */
* { font-family: -apple-system-font, HelveticaNeue, LucidaGrande; }
/* Dynamic Type feature */
* { font-family: -apple-system-headline1, HelveticaNeue, LucidaGrande; }
* { font-family: -apple-system-headline2, HelveticaNeue, LucidaGrande; }
* { font-family: -apple-system-body, HelveticaNeue, LucidaGrande; }
* { font-family: -apple-system-subheadline1, HelveticaNeue, LucidaGrande; }
* { font-family: -apple-system-subheadline2, HelveticaNeue, LucidaGrande; }
# The packages we'll be using
packages <- c("rvest","dplyr","tidyr","pipeR","ggplot2","stringr","data.table")
# From those packages, which ones are not yet installed?
newPackages <- packages[!(packages %in% as.character(installed.packages()[,"Package"]))]
# If any weren't already installed, install them now
if(length(newPackages)) install.packages(newPackages)
# Now make sure all necessary packages are loaded
@gagarine
gagarine / template.tpl.php
Created July 29, 2012 21:11
Working with drupal theme_menu_tree
<?php
/**
* Theme_menu_tree doesn't provide any context information
* THIS SUCKS
* But you can use hook_block_view_alter to change the theme wrapper
* OUF!
*/
function MYTHEME_menu_tree(&$variables) {
@statico
statico / gist:3172711
Created July 24, 2012 21:15
How to use a PS3 controller on Mac OS X 10.7 (Lion)

How to use a PS3 controller on Mac OS X 10.7 (Lion)

  1. Open Apple menu -> System Preferences -> Bluetooth and disable Bluetooth on Mac as well as any other nearby Macs or devices which will try to pair with and confuse the controller.

  2. Reset PS3 controller by inserting paperclip into pinhole near L2 button.

  3. Connect PS3 controller to Mac with USB cable.

  4. Enable Bluetooth.

@radiatoryang
radiatoryang / TriplanarWorld.shader
Created February 6, 2013 19:24
a triplanar / procedural UV / world space UV shader for Unity, cobbled together bits from @quickfingerz and @Farfarer
Shader "Tri-Planar World" {
Properties {
_Side("Side", 2D) = "white" {}
_Top("Top", 2D) = "white" {}
_Bottom("Bottom", 2D) = "white" {}
_SideScale("Side Scale", Float) = 2
_TopScale("Top Scale", Float) = 2
_BottomScale ("Bottom Scale", Float) = 2
}

Build your own private, encrypted, open-source Dropbox-esque sync folder

Prerequisites:

  • One or more clients running a UNIX-like OS. Examples are given for Ubuntu 12.04 LTS, although all software components are available for other platforms as well (e.g. OS X). YMMV
  • A cheap Ubuntu 12.04 VPS with storage. I recommend Backupsy, they offer 250GB storage for $5/month. Ask Google for coupon codes.

Software components used:

  • Unison for file synchronization
  • EncFS for folder encryption