Skip to content

Instantly share code, notes, and snippets.

View eaddingtonwhite's full-sized avatar


View GitHub Profile
eaddingtonwhite / gist:44ff35badcd9a0a223e1
Created July 14, 2014 03:31
Force angular to update scope of DOM element inside controller
var scope = angular.element($('#elementToUpdate')).scope();
scope.$apply(function() {
scope.variable1 = $scope.variable1;
scope.variable2 = $scope.variable2;
eaddingtonwhite / gist:a42e7149b3851dae1ddd
Created September 26, 2014 18:15
Syncronized method in Java
public static synchronized void addValue(int myIndex) {
boolean imDone = false;
System.out.println("Thread " + myIndex + " is trying to add its value");
do {
if (myIndex != numberOfThreadsDone) {
try {
System.out.println(myIndex + " is about to wait");
ParallelSerial.class.wait(); // <-- ** Important need to call className.class.wait() in syncronized method**
} catch (InterruptedException e) {
eaddingtonwhite / 0_reuse_code.js
Last active August 29, 2015 14:07
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
eaddingtonwhite /
Last active August 29, 2015 14:07 — forked from jookyboi/
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.


  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage
eaddingtonwhite / SumArray
Created October 29, 2014 00:39
Sums an array
L1: .word 2,4,6,8,10,12,14,16 # the array
.globl main
main: add $t0, $0, $0 # initialize $t0=0
add $t1, $0, $0 # initialize the sum = 0
lw $t2, L1($t0) # load first value
add $t1, $t1, $t2 # add to sum
addi $t0, $t0, 8 # computer addr of two elements down

Keybase proof

I hereby claim:

  • I am eaddingtonwhite on github.
  • I am eaddingtonwhite ( on keybase.
  • I have a public key ASD4PKByCNZFqPfhbUnTxU7NI2BKe4wElT-6LsNMea-g2Ao

To claim this, I am signing this object: