Skip to content

Instantly share code, notes, and snippets.

View gpluta's full-sized avatar
🙃
...

Greg Pluta gpluta

🙃
...
View GitHub Profile
@gpluta
gpluta / bubble-sort.js
Last active September 29, 2016 06:46
Bubble sorting algorithm
let array = [], sortedArray;
const getRandomNumber = () => Math.round(Math.random() * 100);
for (let i = 0; i < 100; i++) array[i] = getRandomNumber();
console.log('initial array: ', array);
const checkIfArrayIsSorted = array => {
let isSorted = true;
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Query Params',
queryParams: ['offset', 'search'],
offset: 0,
search: undefined,
prevLink: Ember.computed('offset', function() {
return this.get('offset') >= 10 ? this.get('offset') - 10 : 0;