Skip to content

Instantly share code, notes, and snippets.

View matejuh's full-sized avatar
☁️
Out- Czech regions gliding championship

Matej Plch matejuh

☁️
Out- Czech regions gliding championship
View GitHub Profile
@zeroseis
zeroseis / disable-auto-android-file-transfer.md
Created September 14, 2015 17:28
Disable auto start for Android File Transfer
  • Close Android File Transfer
  • Open Activity Monitor and kill “Android File Transfer Agent”
  • Go to where you installed “Android File Transfer.app” (I have it under /Applications)
  • Ctrl+click –> “Show package contents”
  • Go to Contents/Resources
  • Rename “Android File Transfer Agent” to e.g. “Android File Transfer Agent_DISABLED”
  • Then go to “/Users/username/Library/Application Support/Google/Android File Transfer” and again rename the Agent app.
#include "ruby.h"
struct Address {
char * town;
};
static VALUE address_alloc(VALUE klass) {
struct Address* address = malloc(sizeof(struct Address));
VALUE obj = Data_Wrap_Struct(klass, 0, free, address);
/*
N.B. this program doesn't include any error checking. In particular you'll have
to do all the rb_protect stuff
*/
#include <stdio.h>
#include "ruby.h"
struct Address {
char * town;