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
/**** | |
Creatd by Anam Ahmed (https://anam.co) | |
Sample Use: | |
document.querySelector("input[type=file]").addEventListener("change",function(e){ | |
if(e.target.files.length){ | |
_resample(e.target.files[0],1000,function(response){ | |
console.log(response); // returns an object: {stats:<compression stats>,file:output file} | |
}); | |
} | |
}); |
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
; start heating up the bed and nozzle together | |
M140 S{material_bed_temperature_layer_0} ; Set bed temperature | |
M104 S{material_print_temperature_layer_0} T0 ; Set nozzle temp | |
G28 ; home all axes | |
M190 S{material_bed_temperature_layer_0} ; Set bed temperature and wait | |
M109 S{material_print_temperature_layer_0} T0 ; Set nozzle temp and wait | |
M117 Purge extruder | |
G92 E0 ; reset extruder | |
G1 Z5.0 F3000 ; move z up little to prevent scratching of surface | |
G1 X5 Y20 Z0.3 F5000.0 ; move to start-line position |
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 x = parseInt(process.argv[2]); | |
let y = parseInt(process.argv[3]); | |
console.log(x+y); |
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
; Tronxy Crux1 Start Code | |
; Forked from the Tronxy XY 2 Pro Start code on cura | |
; Improvement: Start nozzle and bed heating together | |
; Imorovement: Fixed purge line (XY2 version was for a bigger bed and would draw out of build area) | |
; Bugfix: On glass bed Crux 1, the nozzle would bump on the retainer trying to draw the purge line. Fixed in this version. | |
; Cleanup: Removed all ABL related code since Crux 1 does not have ABL. | |
G21 ; Set units to millimeters | |
G90 ; Set all axis to Absolute | |
M82 ; Set extrusion to Absolute | |
M107 ; Disable all fans |
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
/^(?:\+88|88)?(01[3-9]\d{8})$/ |
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
const otpGenerator = require("otp-generator"); | |
const crypto = require("crypto"); | |
const key = "verysecretkey"; // Key for cryptograpy. Keep it secret | |
function createNewOTP(phone){ | |
// Generate a 6 digit numeric OTP | |
const otp = otpGenerator.generate(6, {alphabets: false, upperCase: false, specialChars: false}); | |
const ttl = 5 * 60 * 1000; //5 Minutes in miliseconds | |
const expires = Date.now() + ttl; //timestamp to 5 minutes in the future | |
const data = `${phone}.${otp}.${expires}`; // phone.otp.expiry_timestamp |
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
const otpGenerator = require("otp-generator"); | |
const crypto = require("crypto"); | |
const key = "verysecretkey"; // Key for cryptograpy. Keep it secret | |
function createNewOTP(phone){ | |
// Generate a 6 digit numeric OTP | |
const otp = otpGenerator.generate(6, {alphabets: false, upperCase: false, specialChars: false}); | |
const ttl = 5 * 60 * 1000; //5 Minutes in miliseconds | |
const expires = Date.now() + ttl; //timestamp to 5 minutes in the future | |
const data = `${phone}.${otp}.${expires}`; // phone.otp.expiry_timestamp |
OlderNewer