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
[package] | |
name = "layerkeep-api" | |
version = "0.0.1" | |
authors = ["wess <me@wess.io>"] | |
edition = "2018" | |
[dependencies] | |
tide = "0.15.0" | |
tera = "1.5.0" | |
tide-tera = "0.2.2" |
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
use serde::{Serialize}; | |
use mongodb::bson::{ | |
to_bson, | |
Bson, | |
}; | |
pub trait Model : Serialize { | |
fn to_bson(&self) -> Bson { | |
to_bson(self).unwrap() |
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
pub fn auth_request<'a>() -> AuthorizationRequest<'a> { | |
let config = Config::env(); | |
let scopes:Vec<String> = config.github.scope; | |
let request = | |
client() | |
.authorize_url(CsrfToken::new_random); | |
for scope in scopes.iter() { | |
request.add_scope( |
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
let hex_string = match hex.len() { | |
3 => format!( | |
"{}{}{}{}{}{}", | |
&hex[..1], | |
&hex[..1], | |
&hex[1..2], | |
&hex[1..2], | |
&hex[2..3], | |
&hex[2..3] | |
), |
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
project: MyPlatform | |
repos: | |
- https://github.com/....git | |
- https://github.com/....git | |
- https://github.com/....git | |
dependencies: | |
- postgresql@latest | |
- rust@1.46.0 |
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
;(function(exports) { | |
"use strict"; | |
Object.defineProperty(exports, "__esModule", { | |
value: true | |
}); | |
exports.default = void 0; | |
var _defaults = _interopRequireDefault(require("axios/lib/defaults")); |
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
@implementation UITextView (Annex) | |
@dynamic visibleTextRange; | |
- (NSRange)visibleTextRange | |
{ | |
CGRect bounds = self.bounds; | |
CGSize textSize = [self.text sizeWithFont:self.font constrainedToSize:bounds.size]; | |
UITextPosition *start = [self characterRangeAtPoint:bounds.origin].start; |
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
How to Calibrate E-Steps (can be added to firmware) | |
M503 ; See current steps | |
M83 ; Set extruder to relative mode | |
M109 S240 ; Warm up the nozzle to 240C for PETG. Use 200 for PLA. | |
G1 E100 F100 ; Extrude 100mm at 100mm/min. In my case, only 89mm extruded and my current settings at the time was the default 93. 100 (desired) / 89 (actual) * 93 (current) = 104.49 | |
M92 E104.49 ; Set steps to 104.49mm / 100mm | |
M500 ; Save settings to EEPROM |
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
/** | |
* Disable all Volumetric extrusion options | |
*/ | |
//#define NO_VOLUMETRICS | |
#if DISABLED(NO_VOLUMETRICS) | |
/** | |
* Volumetric extrusion default state | |
* Activate to make volumetric extrusion the default method, |
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
#!/bin/bash | |
# Run this script in display 0 - the monitor | |
export DISPLAY=:0 | |
# Hide the mouse from the display | |
unclutter & | |
# If Chrome crashes (usually due to rebooting), clear the crash flag so we don't have the annoying warning bar | |
sed -i 's/"exited_cleanly":false/"exited_cleanly":true/' /home/pi/.config/chromium/Default/Preferences |