Skip to content

Instantly share code, notes, and snippets.

View banderson623's full-sized avatar

Brian Anderson banderson623

  • Gain Compliance
  • Rocklin, CA
View GitHub Profile
@banderson623
banderson623 / userscript.js
Last active January 30, 2023 21:27
Use native notification center for Slack in fluid.app
var clickOverrides = function(){
// Automatically mark ALL as read and scroll to it
// when clicking on a channel (stared or normal)
$('#channel-list, #starred-list').on('click',function(){
TS.ui.forceMarkAllRead();
TS.ui.scrollMsgsSoFirstUnreadMsgIsInView();
});
};
@banderson623
banderson623 / monitor.c
Last active December 5, 2020 16:29
Here is my final (?) monitor implementation in C.
/**
* Brian Anderson, Spring 2013
* Com S 352, Assignment 7
*
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
* INTRODUCTION & PURPOSE
* -------------------------------------------------------------------
* Create a monitor library fashioned after the slides shown in class.
* It solves the producer/consumer problem by making sure their
* execution happens in a safe manner, even across multiple threads

The question was asked why I (as a programmer who prefers dynamic languages) don't consider static types "worth it". Here is a short list of what I would need from a type system for it to be truely useful to me:

  1. Full type inference. I would really prefer to be able to write:
(defn concat-names [person]
  (assoc person :full-name (str (:first-name person)
                                (:second-name person))))
const videoElement = document.querySelector('video');
const concertVast = new ConcertVast();
const url = 'https://www.ad-server.com/some-great-vast.xml';
concertVast.loadRemoteVast(url).then(e => {
concertVast.applyToVideoElementAsPreroll(videoElement, {
autoplay: true,
muted: true
});
});
Brian Anderson
Assignment 9 - Com S 352
April 4, 2012
[NOTE --> PLEASE USED A FIXED WIDTH FONT TO READ THIS DOCUMENT]
1. (25pts) Given five memory partitions of 100 KB, 500 KB, 200 KB, 300 KB, and 600 KB (in order
from low-end to high-end of user memory space), how would the first-fit, best- fit, and
worst-fit algorithms place processes of 212 KB, 417 KB, 112 KB, and 426 KB (in the arriving order)?
var words = ["district line", "parsons green", "1 dead 22 injured", "18 year old tourist", "2 students in critical condition", "32 dead after magnitude 8.1 earthquake rocks mexico", "5 people dead", "80 killed", "afghan presidential palace", "afghan war", "afghanistan bombing", "afghanistan isis", "ahmad musa jibril", "aircraft crashed", "alexandria virginia shooting", "alt right", "alyssa elsman", "anti semitic", "anti semitism", "antisemitic", "antisemitic jokes", "antisemitic posts", "antisemitism", "ap bjb flight 202", "apbjb flight 202", "ariana grande", "ass", "asses", "asshole", "assholes", "attack on paris police", "attack philippines", "bangsamoro islamic freedom fighters", "barcelona attack", "barcelona terror attack", "barcelona van attack", "barcelonaattack", "barcelonaterrorattack", "barcelonavanattack", "biff", "biff attack", "bigot", "bisexual", "bisexuals", "bitch", "bitches", "blast hits st petersburg metro carriage", "blast on st petersburg metro", "blast rocks kabul", "blimp at us open catc

JavaScript Debugging Exercise

Our team has been asked to create a premium advertising experience for MegaBaby SuperWipes™. The ad experience should allow users to drag and drop labels into two columns, allowing our loyal customers to vote with their minds and mice. They're hoping to get a sense of how well they are executing their refreshed company goals in the wake of the Great MegaBaby Warehouse Wipeout Incident of 2017.

megababy_start

The design team has created an amazing mockup for us, and our code is almost there! The CSS and HTML is bulletproof, thankfully.

But we're using the lovely dragula open-source drag & drop JavaScript library — and we're having some problems:

/*
* Brian Anderson, Com S 352 Project 1
* UThread a User Thread Library, it uses only 1 "kernel thread"
*/
#ifdef __APPLE__
#define _XOPEN_SOURCE /* See note at the bottom about this */
#endifult_activeContext

Process Notes

Why choose Vue?

  • First, why choose a framework at all? This app is super tiny and not very complex, but it’s just complex enough (and, also, I can imagine it fitting into a larger ecosystem one day) so building it within the structure of a framework makes it easier to manage and maintain
  • Vue a light framework, and this is a tiny app. Good to be able to choose which pieces you need vs having to load an entire framework
  • It’s well maintained, has good performance, and seems intuitive
  • Seems kinda irresponsible to bring another Angular app into this world

Beginning Steps:

  • Reading a lot of documentation

Keybase proof

I hereby claim:

  • I am banderson623 on github.
  • I am banderson623 (https://keybase.io/banderson623) on keybase.
  • I have a public key ASDCH3vSklLpzou1L_a_0yWFkK9yQv_iNt5thtYQsAgHbAo

To claim this, I am signing this object: