Skip to content

Instantly share code, notes, and snippets.

View mauricio's full-sized avatar

Maurício Linhares mauricio

View GitHub Profile
//
// CheckinsApi.m
// Checkins
//
// Created by Maurício Linhares on 3/19/12.
// Copyright (c) 2012 OfficeDrop. All rights reserved.
//
#import "CheckinsApi.h"
#import "User.h"
using System;
using System.IO;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using MonoMac.Foundation;
using System.Threading;
using NUnit.Framework;
using System.Text;
//Any doubts send a email to [email protected]
using System;
using System.IO;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using MonoMac.Foundation;
using System.Threading;
using NUnit.Framework;
using System.Text;
namespace Test
//
// GetGlueApi.m
// GetGlue
//
// Created by Maurício Linhares on 3/24/12.
// Copyright (c) 2012 OfficeDrop. All rights reserved.
//
#import "GetGlueApi.h"
#import "User.h"
@mauricio
mauricio / hack.sh
Created April 3, 2012 02:15 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
#include <stdio.h>
#include <jni.h>
JNIEnv* create_vm() {
JavaVM* jvm;
JNIEnv* env;
JavaVMInitArgs args;
JavaVMOption options[1];
/* There is a new JNI_VERSION_1_4, but it doesn't add anything for the purposes of our example. */
/*
* Copyright 1999-2006 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
class PDFTronXMLFilterWriter( writer : Writer ) extends FilterWriter( writer ) {
val buffer = MutableList[Char]()
val selectedContent = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>".toCharArray
writer.write( selectedContent )
writer.write( "\n<document>\n" )
override def close() {
this.out.write( buffer.mkString("") )
ubuntu@somewhere:/mnt/jobs$ jstat -compiler -h 50 21384 60s 100
Compiled Failed Invalid Time FailedType FailedMethod
8292 5 0 153,95 1 javax/xml/parsers/FactoryFinder findJarServiceProvider
8305 5 0 154,06 1 javax/xml/parsers/FactoryFinder findJarServiceProvider
8314 5 0 154,40 1 javax/xml/parsers/FactoryFinder findJarServiceProvider
shared_examples_for "firefox browser" do
it "should return 'Firefox' as its browser" do
@useragent.browser.should == "Firefox"
end
it "should return :strong as its security" do
@useragent.security.should == :strong
end
it { @useragent.should_not be_webkit }