Skip to content

Instantly share code, notes, and snippets.

View marcolink's full-sized avatar
🪐

Marco Link marcolink

🪐
View GitHub Profile
@marcolink
marcolink / gist:6077904
Last active December 20, 2015 05:19
ByteArray Segmentation
class ByteArrayHelper
{
public static function getSegments(source : ByteArray, size: int = 1000) : Array
{
var result : Array = [];
if(!source)
{
return result;
@marcolink
marcolink / gist:c627c6f965cbdbba88d1
Last active March 4, 2016 19:17
Image Flash to Facebook
post_image_to_facebook: function(d, f) {
var flashData = f[0];
var bs = window.atob( flashData.image ); // data from flash without mime type and base64 identifier
var ia = new Uint8Array(bs.length);
for (var i = 0, a = bs.length; i < a; i++) {
ia[i] = bs.charCodeAt(i);
};
@marcolink
marcolink / 0_reuse_code.js
Last active August 29, 2015 14:12
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@marcolink
marcolink / gist:a0c55615d845697983bf
Last active August 29, 2015 14:24
UIButton with centered text and right aligned icon
UIImage *image = [UIImage new]; // your button icon image
self.button.contentHorizontalAlignment = UIControlContentHorizontalAlignmentCenter;
[self.button setImage:image forState:UIControlStateNormal];
[self.button setImage:image forState:UIControlStateHighlighted];
self.button.imageEdgeInsets = UIEdgeInsetsMake(0, self.button.frame.size.width - image.size.width, 0, 0);
self.button.titleEdgeInsets = UIEdgeInsetsMake(0, 0, 0, image.size.width);
@marcolink
marcolink / PaketDependencyManagementForUnity3d.md
Last active August 23, 2017 12:36
Paket Dependency Management For Unity

Paket Dependency Management For Unity

We use a combination of Paket and Paket.Unity3D in our projects for internal dependency management. There is also a wrapper called Wooget for both, but since we don't maintain it anymore, i will not cover it.

We always need 2 steps to update depenencies:

  • Paket to Install all defined depenency for your project.
  • Paket.Unity3D to add them to the Unity Project.

The Documentation is based on the recommended project structure.

@marcolink
marcolink / .gitignore
Last active July 4, 2017 10:24
Unity Project .gitignore
**/[Ll]ibrary/
**/[Tt]emp/
**/[Oo]bj/
**/[Bb]uild/
**/[Bb]uilds/
**/[Dd]ebug/
**/[Rr]elease/
**/[Bb]in/
**/Assets/AssetStoreTools*
@marcolink
marcolink / AndroidPluginTargets.md
Last active July 4, 2017 10:24
Android Plugin Targets
Path Platform CPU OS
Plugins/Native.Android/libs/armeabi-v7a Android ARMv7
Plugins/Native.Android/libs/x86 Android x86
Plugins/Native.x64 Editor/Standalone x86_64 Any OS
Plugins/Native.x86 Editor/Standalone x86 Any OS
@marcolink
marcolink / cheatsheet.gradle
Last active February 23, 2018 10:12
Gradle cheatsheet
// build local snapshot
gw snapshot -x check -x groovydoc -x githubPublish -x javadoc -x publishGroovydocs
// use local snapshot
buildscript {
repositories {
mavenLocal()
}
dependencies {
classpath "net.wooga.gradle:atlas-paket:0.11.0-SNAPSHOT"