Skip to content

Instantly share code, notes, and snippets.

View dperussina's full-sized avatar

Daniel Perussina dperussina

  • FragilePAK
  • Unknown
View GitHub Profile
<?xml version="1.0" encoding="UTF-8"?>
<service_orders>
<service_order>
<number>123U456</number>
<account>118053</account>
<service_type>White Glove</service_type>
<description>
<![CDATA[SomeService]]>
</description>
<customer>
// Importing required modules
const fs = require('fs');
const readline = require('readline');
const { google } = require('googleapis');
var tools = require('tagnet-tools');
// const { send } = require('process');
const fetch = require('node-fetch');
const path = require('path');
const { JSDOM } = require("jsdom");
@dperussina
dperussina / appsettings.json
Last active June 21, 2023 20:31
Example DAL for SPROCs, CACHE, and PUBSUB
{
"ConnectionStrings": {
"SqlDb": "Server=(localdb)\\mssqllocaldb;Database=mydatabase;Trusted_Connection=True;MultipleActiveResultSets=true",
"Redis": "localhost"
},
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"

JavaScript to Rust Cheat Sheet

The goal of this is to have an easily-scannable reference for the most common syntax idioms in JavaScript and Rust so that programmers most comfortable with JavaScript can quickly get through the syntax differences and feel like they could read and write basic Rust programs.

What do you think? Does this meet its goal? If not, why not?

Variables

JavaScript:

{
"Orders": {
"Order": [{
"CustomerNumber": "1502495343934222282",
"PONumber": "12345",
"SalesOrder": "D-005656566-5050505",
"Email": "[email protected]",
"OriginName": "NAPERVILLE WAREHOUSE",
"OriginAddress1": "1860 W JEFFERSON",
"OriginAddress2": "",
{
"Orders": {
"Order": [{
"CustomerNumber": "1234567",
"PONumber": "4876801916",
"SalesOrder": "75843264_102035",
"Email": "[email protected]",
"OriginName": "West Coast Distribution Center",
"OriginAddress1": "700 E Roth Rd Bldg 550",
"OriginAddress2": "Sharpe Army Depot",
{
"orderDateTime": "2020-04-09-13.00.17.728000",
"companyId": "100",
"carrier": "FEDX",
"soldTo": {
{
"Orders": {
"Order": [{
"CustomerNumber": "1234567",
"PONumber": "4871999328",
"SalesOrder": "75786347_074435",
"Email": "[email protected]",
"OriginName": "West Coast Distribution Center",
"OriginAddress1": "123 Main Street",
"OriginAddress2": "Deport 456",
{
"Orders": {
"Order": [{
"CustomerNumber": "1234567",
"PONumber": "4837721868",
"SalesOrder": "32970289_040353",
"Email": "[email protected];[email protected]",
"OriginName": "Dan Daniel Distribution Center",
"OriginAddress1": "231 Enterprise Drive",
"OriginAddress2": null,
{
"Orders": {
"Order": [{
"CustomerNumber": "1234567",
"PONumber": "4815863980",
"SalesOrder": "44248698_210430",
"Email": "[email protected];[email protected]",
"OriginName": "Waco Distribution Center",
"OriginAddress1": "1801 Exchange Parkway",
"OriginAddress2": null,