Skip to content

Instantly share code, notes, and snippets.

@garuma
garuma / DirectManipulation.cs
Created Mar 31, 2019
Basic DirectManipulation binding roughly generated from its IDL file
View DirectManipulation.cs
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 Jan 15, 2018
Netduino 3 Wi-Fi OneWire temperature sensor sent over MQTT
View Program.cs
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;
View computation-expression.workbook

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 Sep 8, 2016
A Java API differ using Java.Interop's Xamarin.Android.Tools.Bytecode library
View JavaApiDiff.cs
using System;
using System.Linq;
using System.Collections.Generic;
using Xamarin.Android.Tools.Bytecode;
namespace JavaApiDiff
{
class MainClass
{
@garuma
garuma / Main.axml
Created Mar 29, 2015
Cat face with animated vector drawables
View Main.axml
<?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"
View QuestMapView.cs
class QuestMapView : View
{
const int BaseRadius = 5;
Paint mainPaint;
Paint linePaint;
Drawable ripple;
int radius;
int textMargin;
View gist:9244458
/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)
View Parser.jay
%{
using System;
using System.IO;
using System.Linq;
using System.Collections.Generic;
namespace MarkdownParser
{
class Counter
{
View gist:6090532
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