Skip to content

Instantly share code, notes, and snippets.

View slideep's full-sized avatar
🤠
Make it work, make it right and make it fast.

Slideep slideep

🤠
Make it work, make it right and make it fast.
View GitHub Profile

Flashing NVIDIA Jetson Orin Nano (reComputer J3011) from Windows Using WSL2

A complete technical guide to flashing JetPack 6.1 on a Seeed Studio reComputer J3011 using only Windows + WSL2 — no native Linux machine required.


Table of Contents

  1. Overview
  2. Hardware & Software Inventory
param webAppName string
param deploymentFullName string
var isApiApp = ((webAppName == 'api1') || (webAppName == 'api2') || (webAppName == 'api3') || (webAppName == 'api4'))
var virtualDirectories = [
{
virtualPath: '/anotherspaapp'
physicalPath: 'site\\wwwroot\\anotherspaapp'
}
@slideep
slideep / gist:3110263
Created July 14, 2012 09:46
An example using Array.AsReadOnly<T>
public static ICollection<string> ColumnNames(DataColumnCollection columns)
{
if (columns == null)
{
throw new ArgumentNullException("columns");
}
return Array.AsReadOnly<string>(
columns.OfType<DataColumn>()
.ToList()
@slideep
slideep / gist:2867812
Created June 4, 2012 11:21
Quickly generate random data files (with extension from pre-defined list).
private static void GenerateRandomDataFiles(int countOfDataFiles)
{
if (countOfDataFiles <= 0)
{
throw new ArgumentOutOfRangeException("countOfDataFiles", "Expected at least a positive numeric value.");
}
Enumerable.Range(0, countOfDataFiles).ToList().ForEach(i =>
{
const string foobarPrefix = "foobar";
@slideep
slideep / gist:2282335
Created April 2, 2012 10:08
ReSharper : Possible multiple enumeration of IEnumerable (and a fix)
// http://bit.ly/H8nSpm
var propertyNodes =
templateNode.XPathSelectElements(propertyDescription).ToList();
if (propertyNodes.Any()) {
propertyNodes.TakeWhile(HasElement).ToList().ForEach(propertyNode =>
{
@slideep
slideep / MongoDB-query-$nin-conditional
Created February 15, 2012 12:49
An example using MongoDB query with $nin conditional
db.airports.find({ "iso_country" : "FI", "type" : { "$nin" : ["heliport", "small_airport"] } }).limit(100).sort({ "name" : 1 })
@slideep
slideep / gist:1835377
Created February 15, 2012 12:28
An example how to use XElement's XPathSelectElement-extension method.
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.IO;
using System.Linq;
using System.Xml.Linq;
using System.Xml.XPath;
namespace TemplateGenerator
{
@slideep
slideep / gist:1835305
Created February 15, 2012 12:08
A Linq example for creating IDictionary<T,U> from a List<T> containing IDictionary<T,U> items by flattening (SelectMany-operator) source.
using System;
using System.Collections.Generic;
using System.Linq;
namespace TemplateGenerator
{
public class TemplateGeneratorController
{
private IDictionary<string, IDescription> _descriptions;
@slideep
slideep / last-minute-offers-json-structure.txt
Created February 3, 2012 14:36
last-minute-offers-json-structure
{
"id":"",
"depcity":"",
"depdate":"",
"arrdate":"",
"destcountry":"",
"destcity":"",
"hotel":"",
"category":"",
"agency":"",