This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
cd ~ | |
sudo service octoprint stop | |
sudo rm -Rf OctoPrint | |
sudo rm -Rf .octoprint | |
sudo apt-get update | |
sudo apt-get -y upgrade | |
sudo apt-get -y install python-pip python-dev python-setuptools python-virtualenv git libyaml-dev | |
git clone https://github.com/foosel/OctoPrint.git | |
cd OctoPrint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Requires Python 2.7 assumed to be at C:\Python27. | |
Assumes global Python install has pip and virtualenv and maybe other stuff. | |
Either git clone or unzip the repo files somewhere. | |
Assuming you are bleeding edge and want to try the dev branch https://github.com/foosel/OctoPrint/archive/devel.zip. | |
Assuming here that you unzipped it to c:\Temp and now have this directory C:\Temp\OctoPrint-devel\OctoPrint-devel. | |
Hint: Text after the colon in the commands below can be pasted into the cmd window. | |
Hint: To paste to the cmd window press [alt]+[space],e,p in the cmd window. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
// 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(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Library of some stuff |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body, button { | |
/* brilliant UX */ | |
font-family :"Comic Sans MS" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- 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."); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |