Skip to content

Instantly share code, notes, and snippets.

View Glavin001's full-sized avatar
💻
Working - I may be slow to respond.

Glavin Wiechert Glavin001

💻
Working - I may be slow to respond.
View GitHub Profile
@Glavin001
Glavin001 / mouse.js
Created January 11, 2014 08:55 — forked from bfncs/mouse.js
/**
* Read Linux mouse(s) in node.js
* Author: Marc Loehe (marcloehe@gmail.com)
*
* Adapted from Tim Caswell's nice solution to read a linux joystick
* http://nodebits.org/linux-joystick
* https://github.com/nodebits/linux-joystick
*/
var fs = require('fs'),
App.collectionController = Em.ArrayProxy.create(Ember.PaginationSupport, {
content: [],
fullContent: App.store.findAll(App.Job),
totalBinding: 'fullContent.length',
didRequestRange: function(rangeStart, rangeStop) {
var content = this.get('fullContent').slice(rangeStart, rangeStop);
this.replace(0, this.get('length'), content);
}
});

[Enter steps to reproduce below:]

  1. 'Editing a JavaScript file. See other file.
  2. Add the {} for the function value for key prepare
  3. Press Enter while cursor inside {} (which was autocompleted) to expand {} to new lines.
  4. Error occurrs, when trying to expand {}.

I notice now that I cannot reproduce after I reload and/or after I paste the contents over the text editor.

Atom Version: 0.201.0

@Glavin001
Glavin001 / README.md
Last active August 29, 2015 14:27
Bulk change Facebook Application Notification Settings
@Glavin001
Glavin001 / The Technical Interview Cheat Sheet.md
Created February 6, 2016 01:11 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
@Glavin001
Glavin001 / README.md
Created June 14, 2016 14:17 — forked from sxywu/README.md
The Force with React + D3, Approach #3

React + D3 exploration with the force layout:

  • React for structure
  • D3 for data calculation
  • D3 for rendering

Pro:

  • The viz scales!
  • Use all the d3 functions!

Con:

@Glavin001
Glavin001 / README.md
Created June 14, 2016 21:34 — forked from sathomas/README.md
Understanding D3.js Force Layout - 5: charge

This is part of a series of examples that describe the basic operation of the D3.js force layout. Eventually they may end up in a blog post that wraps everything together. If you missed the beginning of the series, here's a link to first example.

The previous example shows how linkDistance tells the force layout the desired distance between connected nodes. It may seem strange that D3 doesn't simply compel all links to be that distance. The force layout, however, takes

@Glavin001
Glavin001 / style.css
Created July 14, 2016 02:31
Maximize size (almost Full-Screen) of iframe for Pearson eText on Brightspace
#d2l_minibar {
z-index: 100;
}
#ContentView iframe.d2l-iframe {
position: absolute;
top: 35px;
bottom: 0;
left: 0;
right: 0;
var $els = document.querySelectorAll("input[type=\"radio\"]");
for (var i of $els) {
i.checked = true;
}
var $els = document.querySelectorAll("select option");
for (var i of $els) {
i.selected = "selected";
}