Skip to content

Instantly share code, notes, and snippets.

View marpstar's full-sized avatar

Cody Sand marpstar

View GitHub Profile
@marpstar
marpstar / mongodb-diff.ts
Last active February 26, 2023 23:19
Compare Two MongoDB Collections (even on different servers) in TypeScript
/**
* MIT License
* Copyright (c) 2023 Cody Sand
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
@marpstar
marpstar / usaCities.js
Created March 13, 2018 03:37 — forked from Lwdthe1/usaCities.js
JSON of 5,950+ USA Cities and Their States
[
{'city': 'Abbeville', 'state': 'Louisiana'},
{'city': 'Aberdeen', 'state': 'Maryland'},
{'city': 'Aberdeen', 'state': 'Mississippi'},
{'city': 'Aberdeen', 'state': 'South Dakota'},
{'city': 'Aberdeen', 'state': 'Washington'},
{'city': 'Abilene', 'state': 'Texas'},
{'city': 'Abilene', 'state': 'Kansas'},
@marpstar
marpstar / linkedin-industry-codes-typescript.ts
Last active April 3, 2019 06:05 — forked from gp187/linkedin-industry-codes.json
LinkedIn Full Industry Codes in TypeScript
export interface JobIndustry {
Code: number;
Groups: string[];
Description: string;
}
export const all: JobIndustry[] = [
{ Code: 47, Groups: ["corp", "fin"], Description: "Accounting" },
{ Code: 94, Groups: ["man", "tech", "tran"], Description: "Airlines/Aviation" },
{ Code: 120, Groups: ["leg", "org"], Description: "Alternative Dispute Resolution" },
@marpstar
marpstar / project.json
Created August 18, 2016 22:31
System.Reactive 3.0.0 project.json Setup
{
"version": "1.0.0-*",
"buildOptions": {
"debugType": "portable",
"emitEntryPoint": true
},
"dependencies": {},
"frameworks": {
"netcoreapp1.0": {
"dependencies": {
@marpstar
marpstar / README.md
Last active June 29, 2016 05:12
3d viewer building

Prereqs

Just for ease, you should npm install -g http-server so that you can serve this viewer easily.

Get the code

  • BitBucket Repo: https://csand@bitbucket.org/csand/1upusa.git
  • Note the 3d-viewer folder. That is the viewer for the files you'll generate.
  • You don't need to worry about WordPress or anything. Don't bother trying to MAMP.
module SimpleExamples =
open System
type Customer(firstName: string) =
member this.FirstName = firstName
@marpstar
marpstar / MimeMapping.cs
Created February 25, 2015 16:06
MimeMapping class for MIME type.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace MyApp
{
public static class MimeMapping
{
public static string GetContentType(string SourceFileName)
@marpstar
marpstar / gist:2b10ec02833700037e5a
Last active August 29, 2015 14:15
Idea Prompts
  • [Technology is about doing more with less][1].
  • Ask a non-coder
@marpstar
marpstar / something.js
Created December 22, 2014 06:23
JavaScript Gist Test
(function() {
var foo = window["bar"];
if(foo) {
setTimeout(function() {
alert("!");
});
}
})();
$get: function($q, $rootScope) {
function send(remoteAction, options, nullok) {
var namespace, controller, method;
var Manager = Visualforce.remoting.Manager;
var parts = remoteAction.split('.');
var instance = this;
if (options && typeof options !== 'object') {
throw new Error('Options must be an object');
}