Skip to content

Instantly share code, notes, and snippets.

C G Am F
No woman no cry
C F C G
No woman no cry
C G Am F
No woman no cry 1st verse
Here little darlin dont shed no tears 2nd verse
C F C
No woman no cry
GraphicsWindow.Title = "http://www.gotostcroix.com/live/harborcam.php"
url = "http://images.earthcam.com/affiliates/mmstcroix.jpg"
GraphicsWindow.Width = 640
GraphicsWindow.Height = 480
delay = 5000
oldImg = Shapes.AddImage(ImageList.LoadImage(url))
counter = 1 ' have to change url or silverlight caches the image
While "True"
newImg = Shapes.AddImage(ImageList.LoadImage(url + "?nc=" + counter))
Shapes.Move(newImg, 0, GraphicsWindow.Height + ImageList.GetHeightOfImage(newImg))
@foofoodog
foofoodog / UnitTest1.cs
Created May 26, 2012 02:36
Super simple sharepoint list item ORM.
using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.SharePoint;
namespace TestProject2
{
[TestClass]
public class UnitTest1
@foofoodog
foofoodog / powershell-winform.ps1
Created July 8, 2012 13:52
powershell-winform
New-Module -ScriptBlock {
[System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") | Out-Null
$form = New-Object System.Windows.Forms.Form
$grid = New-Object System.Windows.Forms.PropertyGrid
$grid.Dock = [System.Windows.Forms.DockStyle]::Fill
$button = New-Object System.Windows.Forms.Button
$button.Text = "OK"
$button.Dock = [System.Windows.Forms.DockStyle]::Bottom
@foofoodog
foofoodog / PasswordReset.cshtml.patch
Created November 30, 2012 17:44
Patch for ASP.NET Web Site (Razor v2) Visual C# - Account\PasswordReset.cshtml - broken and erroneous validation.
--- OLD_PasswordReset.cshtml
+++ NEW_PasswordReset.cshtml
@@ -14,13 +14,13 @@
bool isSuccess = false;
// Setup validation
Validation.RequireField("newPassword", "The new password field is required.");
Validation.Add("confirmPassword",
Validator.EqualsTo("newPassword", "The new password and confirmation password do not match."));
- Validation.RequireField("passwordResetToken", "The password reset token field is required.");
@foofoodog
foofoodog / fiddle.css
Last active December 16, 2015 21:00
jsfiddle test
body, button {
/* brilliant UX */
font-family :"Comic Sans MS"
}
@foofoodog
foofoodog / Library
Last active December 16, 2015 21:09
Library of some stuff
Library of some stuff
@foofoodog
foofoodog / Octo.cs
Last active January 22, 2022 09:25
Read only C# wrapper for OctoPrint API
/*
// OctoPrint API wrapper
// csc /target:library Octo.cs /r:System.Net.Http.dll
// linqpad
var server = "http://localhost:5000";
// print3r.Reader<print3r.Logs.Result>.Read(server).Dump();
// print3r.Reader<print3r.Connection.Result>.Read(server).Dump();
// print3r.Reader<print3r.Files.Result>.Read(server).Dump();
// print3r.Reader<print3r.Job.Result>.Read(server).Dump();
// print3r.Reader<print3r.Printer.Result>.Read(server).Dump();
@foofoodog
foofoodog / 3dwatch.cs
Last active August 29, 2015 14:12
Watch a folder for STL files, slice them, then upload the gcode to Octoprint
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Net.Http;
using System.Threading.Tasks;
// csc 3dwatch.cs /r:System.Net.Http.dll
// Run this in a directory where there is a slic3r.ini and where STL or gcode files will be created.
@foofoodog
foofoodog / octonag.diff
Last active August 29, 2015 14:15
Intercept KO click bindings and add confirmation where desired in OctoPrint
Index: src/octoprint/static/js/app/confirm.js
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/octoprint/static/js/app/confirm.js (revision )
+++ src/octoprint/static/js/app/confirm.js (revision )
@@ -0,0 +1,36 @@
+(function() {
+ var originalInit = ko.bindingHandlers.click.init;