Skip to content

Instantly share code, notes, and snippets.

@garuma
garuma / DirectManipulation.cs
Created March 31, 2019 03:15
Basic DirectManipulation binding roughly generated from its IDL file
using System;
using System.Drawing;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security;
namespace DirectManipulation
{
[Guid ("FBF5D3B4-70C7-4163-9322-5A6F660D6FBC")]
[CoClass (typeof (DirectManipulationManagerClass))]
@garuma
garuma / Program.cs
Created January 15, 2018 23:51
Netduino 3 Wi-Fi OneWire temperature sensor sent over MQTT
using System;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;
using System.Threading;
using System.IO;
using System.Net;
using SecretLabs.NETMF.Hardware.Netduino;
using Microsoft.SPOT.Net.NetworkInformation;
using uPLibrary.Networking.M2Mqtt;

packages:

  • id: MathNet.Numerics.Core version: 3.17.0
  • id: OxyPlot.Core version: 2.0.0-unstable1013 uti: com.xamarin.workbook id: 744cd41b-7a5b-44a4-b17d-80a4297f0fc3 title: computation-expression platforms:
@garuma
garuma / JavaApiDiff.cs
Last active September 8, 2016 18:14
A Java API differ using Java.Interop's Xamarin.Android.Tools.Bytecode library
using System;
using System.Linq;
using System.Collections.Generic;
using Xamarin.Android.Tools.Bytecode;
namespace JavaApiDiff
{
class MainClass
{
@garuma
garuma / android_m_links.md
Last active August 29, 2015 14:25
What's New in Android M links
@garuma
garuma / Main.axml
Created March 29, 2015 22:00
Cat face with animated vector drawables
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<ProgressBar
android:src="@drawable/cat_face_vector"
android:layout_width="192dp"
android:layout_height="192dp"
android:layout_gravity="center"
android:indeterminate="true"
class QuestMapView : View
{
const int BaseRadius = 5;
Paint mainPaint;
Paint linePaint;
Drawable ripple;
int radius;
int textMargin;
/Users/jeremie/projects/Moyeu/MobileHtmlAgilityPack/MobileHtmlAgilityPack.csproj: Error: /Users/jeremie/projects/Moyeu/MobileHtmlAgilityPack/MobileHtmlAgilityPack.csproj: /Library/Frameworks/Mono.framework/Versions/3.2.7/lib/mono/xbuild/Microsoft/Portable/v4.5/Microsoft.Portable.CSharp.targets: Project file could not be imported, it was being imported by /Users/jeremie/projects/Moyeu/MobileHtmlAgilityPack/MobileHtmlAgilityPack.csproj: /Library/Frameworks/Mono.framework/Versions/3.2.7/lib/mono/xbuild/Microsoft/Portable/v4.5/Microsoft.Portable.CSharp.targets could not import "$(MSBuildToolsPath)\Microsoft.Portable.CSharp.Targets" (MobileHtmlAgilityPack)
@garuma
garuma / Parser.jay
Last active January 13, 2016 19:37
%{
using System;
using System.IO;
using System.Linq;
using System.Collections.Generic;
namespace MarkdownParser
{
class Counter
{
alias mono='/Users/jeremie/mono/mono/runtime/mono-wrapper'
export MONO_PATH=/Users/jeremie/mono/mono/mcs/class/lib/net_4_5/:$MONO_PATH
alias dmcs='/Users/jeremie/mono/mono/runtime/mono-wrapper /Users/jeremie/mono/mono/mcs/class/lib/net_4_5/dmcs.exe'
alias mcs='/Users/jeremie/mono/mono/runtime/mono-wrapper /Users/jeremie/mono/mono/mcs/class/lib/build/mcs.exe'
alias csharp='/Users/jeremie/mono/mono/runtime/mono-wrapper /Users/jeremie/mono/mono/mcs/class/lib/net_4_5/csharp.exe'
alias xsp='/Users/jeremie/mono/mono/runtime/mono-wrapper /usr/local/lib/mono/4.0/xsp4.exe'
export PS1="[mono master] "$PS1