Skip to content

Instantly share code, notes, and snippets.

@nudoru
nudoru / snippets.js
Last active January 23, 2024 22:22
A collection of utility functions helpful for generative art
//----------------------------------------------------------------------------------------------------------------------
// RANDOMS
// Replace this with your random number generator of choice
export const randomValue = () => Math.random();
export const randomNumberBetween = (min, max) => Math.abs(randomValue()) * (max - min) + min;
export const randomWholeBetween = (min, max) => Math.round(randomValue() * (max - min) + min);
@nudoru
nudoru / lxp search csv parser
Created February 24, 2021 19:20
Parse search data from the LXP via the CSV export file
/* eslint-disable no-plusplus */
const csv = require('csvtojson');
const dayjs = require('dayjs');
const customParseFormat = require('dayjs/plugin/customParseFormat');
const isBetween = require('dayjs/plugin/isBetween');
const report = './search-report.csv';
const startDate = dayjs('2021-01-01');
const endDate = dayjs('2021-01-31');
# Blender 2.90.0, Commit date: 2020-08-31 11:26, Hash 0330d1af29c0
bpy.context.space_data.shading.type = 'RENDERED' # Property
bpy.context.space_data.shading.type = 'RENDERED' # Property
bpy.ops.node.select(wait_to_deselect_others=True, mouse_x=1646, mouse_y=589, extend=False, deselect_all=True) # Operator
bpy.ops.node.translate_attach(TRANSFORM_OT_translate={"value":(-52.2261, -252.009, 0), "orient_type":'GLOBAL', "orient_matrix":((1, 0, 0), (0, 1, 0), (0, 0, 1)), "orient_matrix_type":'GLOBAL', "constraint_axis":(False, False, False), "mirror":True, "use_proportional_edit":False, "proportional_edit_falloff":'SPHERE', "proportional_size":0.620921, "use_proportional_connected":False, "use_proportional_projected":False, "snap":False, "snap_target":'CLOSEST', "snap_point":(0, 0, 0), "snap_align":False, "snap_normal":(0, 0, 0), "gpencil_strokes":False, "cursor_transform":False, "texture_space":False, "remove_on_cancel":False, "release_confirm":False, "use_accurate":False, "use_automerge_and_split":False}, NODE
@nudoru
nudoru / gist:d144a9b4053909f0f4add0895f8dde42
Created September 14, 2020 14:00
blender-prorender-egpu-crash.txt
Process: Blender [7376]
Path: /Applications/Blender.app/Contents/MacOS/Blender
Identifier: org.blenderfoundation.blender
Version: 2.90.0 (2.90.0 2020-08-31)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Blender [7376]
User ID: 502
Date/Time: 2020-09-14 09:59:02.023 -0400
@nudoru
nudoru / mbp16-bootcamp.md
Created August 4, 2020 10:59
Trying to get my MacBook to play Fortnite decently

Bootcamp

My specs:

  • MacBook Pro 16", 2019
  • i9 2.4ghz
  • 5500m 8gb

Current Issues

  • Inconsistant perf. One boot will be fine, the next will drop to bad performance.
@nudoru
nudoru / linkedin-learning-width
Last active April 29, 2020 15:07
Make LinkedIn Learning better with bigger videos
// Tested in Firefox with the Live Editor add-on https://addons.mozilla.org/en-US/firefox/addon/live-editor-for-css-less-sass
// Last updated 4/29/20
// This one will probably work in Chrome: https://chrome.google.com/webstore/detail/stylebot/oiaejidbmkiecgbjeifoejpgmdaleoha
// Changes the standard player page:
// 1. Make the video pane wider
// 2. Hide the resizer control
// 3. Make the outline narrow so you can still jump around the course as needed
.course-body__player-area {
@nudoru
nudoru / ll-agg-query.js
Created April 21, 2020 11:22
Simple Learning Locker Aggregate Query
// Simple, no error handled, Learning Locker Aggregate Query Fetcher
// In the secrets object, point it to your endpoint and paste your client token
// Web has native but for Node.js let fetch = require('node-fetch');
let secrets = {
endpoint: 'https://abc.learninglocker.net',
token:
'123',
};
$red-tint3: rgb(253, 219, 219);
$red-tint2: rgb(250, 182, 182);
$red-tint1: rgb(245, 109, 109);
$red: rgb(238, 0, 0);
$red-shade1: rgb(190, 0, 0);
$red-shade2: rgb(143, 0, 0);
$red-shade3: rgb(95, 0, 0);
$purple-tint3: rgb(232, 228, 246);
$purple-tint2: rgb(186, 173, 227);
var rndNumbers = [];
var uniqueArray = [];
var uniqueObj = [];
function getRandomInt(min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min;
}
function addUniqueToArray(arr, val) {
[{"SPID":199,"LinkTitle":"Hewitt_2015_52","Resource":"Hewitt, Dometrius D","WeekID":"2015_52","Data":[{"342":{"allocation":"1","monday":"","tuesday":"","wednesday":"","thursday":"","friday":"","comments":"","worktype":"Facilitate"}},{"609":{"allocation":"1","monday":"","tuesday":"","wednesday":"","thursday":"","friday":"","comments":"","worktype":"Facilitate"}},{"340":{"allocation":"1","monday":"","tuesday":"","wednesday":"","thursday":"","friday":"","comments":"","worktype":"Facilitate"}},{"332":{"allocation":"1","monday":"","tuesday":"8","wednesday":"8","thursday":"4","friday":"","comments":"","worktype":"Facilitate"}},{"335":{"allocation":"1","monday":"","tuesday":"","wednesday":"","thursday":"","friday":"","comments":"","worktype":"Facilitate"}},{"331":{"allocation":"1","monday":"","tuesday":"","wednesday":"","thursday":"","friday":"","comments":"","worktype":"Facilitate"}},{"333":{"allocation":"1","monday":"","tuesday":"","wednesday":"","thursday":"","friday":"","comments":"","worktype":"Facilitate"}},{"