Skip to content

Instantly share code, notes, and snippets.

@webmonger
webmonger / gist:4a070bad6d585821df68f8fb9ead5c0b
Created November 15, 2017 19:13
Overlord pro Start G-Code
M190 S[first_layer_bed_temperature]
M109 S[first_layer_temperature]
G21 ;metric values
G90 ;absolute positioning
M82 ;set extruder to absolute mode
M107 ;start with the fan off
G28 X0 Y0 ;move X/Y to min endstops
G28 Z0 ;move Z to min endstops
G1 Z15.0 F4000 ;move the platform down 15mm
G1 X50 Y50 ;move off centre and touch the bed to hold the extruded filament
@webmonger
webmonger / App.cs
Last active April 8, 2016 14:39
NodaTimeJsonConverter for MvvmCross
Mvx.RegisterType<IMvxJsonConverter, NodaTimeJsonConverter>();
@webmonger
webmonger / NuGet.config
Last active August 29, 2015 14:19
NuGet.config
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="myget" value="http://www.myget.org/F/glimpsedependencies/" />
<add key="nuget" value="https://nuget.org/api/v2/" />
</packageSources>
</configuration>
@webmonger
webmonger / gist:2da00c6402aeaa5bc4dc
Created April 11, 2015 21:49
pip install BiblioPixel
pip install BiblioPixel
Downloading/unpacking BiblioPixel
Downloading BiblioPixel-1.1.7.zip
Exception:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 104, in main
status = self.run(options, args)
File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 245, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 985, in prepare_files
<metadata>
<attr path="/api/package[@name='org.fourthline.cling.protocol.sync']/class[@name='ReceivingAction']/method[@name='executeSync' and count(parameter)=0]" name="managedReturn">Java.Lang.Object</attr>
<attr path="/api/package[@name='org.fourthline.cling.protocol.sync']/class[@name='ReceivingRetrieval']/method[@name='executeSync' and count(parameter)=0]" name="managedReturn">Java.Lang.Object</attr>
<attr path="/api/package[@name='org.fourthline.cling.protocol.sync']/class[@name='ReceivingUnsubscribe']/method[@name='executeSync' and count(parameter)=0]" name="managedReturn">Java.Lang.Object</attr>
<attr path="/api/package[@name='org.fourthline.cling.protocol.sync']/class[@name='SendingEvent']/method[@name='executeSync' and count(parameter)=0]" name="managedReturn">Java.Lang.Object</attr>
<attr path="/api/package[@name='org.fourthline.cling.protocol.sync']/class[@name='SendingUnsubscribe']/method[@name='executeSync' and count(parameter)=0]" name="managedReturn">Java.Lang.Object</attr>
<attr p
@webmonger
webmonger / gist:1fc0c4b5be8f71131702
Created October 21, 2014 10:27
First and Second run of an Android (Xamarin) App opening from the App menu
Run 1 - Load app from downloads folder - press open - click home - open again from App menu
10-21 11:22:00.529: I/mono-stdout(11405): MONO - CTOR - HelloAndroid
10-21 11:22:00.564: I/mono-stdout(11405): MONO - OnCreate Start
10-21 11:22:00.644: I/mono-stdout(11405): MONO - OnCreateView Start
10-21 11:22:00.649: I/mono-stdout(11405): MONO - OnCreateView Start
10-21 11:22:00.654: I/mono-stdout(11405): MONO - OnCreateView Start
10-21 11:22:00.659: I/mono-stdout(11405): MONO - OnCreateView Start
10-21 11:22:00.679: I/mono-stdout(11405): MONO - OnCreateView Start
10-21 11:22:00.699: I/mono-stdout(11405): MONO - OnCreateView Start
@webmonger
webmonger / MvxLegacyBarActivity.cs
Last active December 27, 2015 21:19
MvvmCross LegacyBar implementation. I had to build the library from GitHub rather than using the Component from the Xamarin make sure you switch to the eventmenu branch or this will not work
using System;
using Android.App;
using Android.Content;
using Android.Views;
using Cirrious.MvvmCross.Droid.Views;
using LegacyBar.Library.BarBase;
namespace BarcodeWars.Droid.Controls
{
public class MvxLegacyBarActivity : MvxActivity
@webmonger
webmonger / gist:4690423
Created February 1, 2013 09:54
.net Razor helper to be used with LinqToTwitter http://linqtotwitter.codeplex.com/ put the 4 oAuth keys for Single User Auth in your web.config and you've done you recieve a List<Status>
public static IList<Status> GetTwitterFeed(string screenName)
{
var auth = new SingleUserAuthorizer()
{
Credentials = new InMemoryCredentials
{
ConsumerKey =
ConfigurationManager.AppSettings["twitterConsumerKey"],
ConsumerSecret =
ConfigurationManager.AppSettings["twitterConsumerSecret"],