Skip to content

Instantly share code, notes, and snippets.

View OSP123's full-sized avatar

OSP123

  • UCLA Extension
  • Los Angeles, CA
View GitHub Profile
++ Army Roster (Imperium - Astra Militarum) [1,995pts] ++
+ Configuration +
Battle Size: 2. Strike Force (2000 Point limit)
Detachment: Combined Regiment
@OSP123
OSP123 / gist:730b8e80d92ce182af4d77b54a23d293
Created October 21, 2023 11:10
Bullgryns, Death Korps, and Tanks
Bullgryns and homies (2000 points)
Astra Militarum
Strike Force (2000 points)
Combined Regiment
CHARACTERS
Gaunt’s Ghosts (100 points)
• 1x Ibram Gaunt
@OSP123
OSP123 / gist:f4ba03c8c19da4e43aedea6fc54de9eb
Created October 17, 2023 13:06
Guard Bullgryns, Mortars, and Tanks
Bullgryns and homies (2000 points)
Astra Militarum
Strike Force (2000 points)
Combined Regiment
CHARACTERS
Gaunt’s Ghosts (100 points)
• 1x Ibram Gaunt
Bullgryns and homies (2000 points)
Astra Militarum
Strike Force (2000 points)
Combined Regiment
CHARACTERS
Cadian Command Squad (65 points)
• 1x Cadian Commander
@OSP123
OSP123 / gist:a42d614ac5c7a57fc6d1ad9677423ba9
Created October 15, 2023 13:05
Dumb Dumbs and Fwends 40k List
Dumb Dumbs and Fwends (2000 points)
Astra Militarum
Strike Force (2000 points)
Combined Regiment
CHARACTERS
Cadian Command Squad (65 points)
• 1x Cadian Commander
mocha.run()
.on('test', function (test) {
console.log('Test started: ' + test.title);
})
.on('test end', function (test) {
console.log('Test done: ' + test.title);
})
.on('pass', function (test) {
console.log('Test passed');
console.log(test);
// Return n lines of Pascal's Triangle
// Solution Time: 6 minutes.
// This is one I've never done before. I just made it however so that the first and last elem in each array group is a 1, and then everything else is just the sum of ([x] + [x - 1]).
function pascal (lines) {
var arr = [[1],[1,1]];
for (var x = 2; x < lines; x++) {
arr[x] = [];
for (var y = 0; y < arr[x - 1].length + 1; y++) {
if (!arr[x - 1][y - 1] || !arr[x - 1][y]) {
arr[x][y] = 1;

Week of 13 HW: Friend Finder - Node and Express Servers

Overview

In this activity, you'll build a compatibility-based "FriendFinder" application -- basically a dating app. This full-stack site will take in results your users' surveys, then compare their answers with those from other users. The app will then display the name and picture of the user with the best overall match.

You will use Express to handle routing. Make sure you deploy your app to Heroku so other users can fill it out.

Before You Begin

Associations
For the most part hooks will work the same for instances when being associated except a few things
When using add/set functions the beforeUpdate/afterUpdate hooks will run.
The only way to call beforeDestroy/afterDestroy hooks are on associations with onDelete: 'cascade' and the option hooks: true. For instance:
var Projects = sequelize.define('projects', {
title: DataTypes.STRING
})
// INSTRUCTIONS:
// Level 1: Take any movie with a word title (ex: Cinderella) as a Node argument and retrieve the year it was created
// Level 2 (More Challenging): Take a move with multiple words (ex: Forrest Gump) as a Node argument and retrive the year it was created.
// ----------------------------------------------------------------------------------
var request = require('request');
// ... are the places where you need to code!
var args = process.argv;
args.splice(0, 2);