This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* $bp-mega: 2500px; | |
* $bp-mega: 1900px; | |
* $bp-kilo: 1360px; | |
* $bp-centi: 1024px; | |
* $bp-milli: 768px; | |
* $bp-nano: 480px; | |
*/ | |
$breakpoint-map: ( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { of, BehaviorSubject } from 'rxjs'; | |
import { fromFetch } from 'rxjs/fetch'; | |
import { switchMap, catchError } from 'rxjs/operators'; | |
interface CustomMethodInterface { | |
name: string; | |
endpoint: string; | |
method: 'GET' | 'POST' | 'PATCH' | 'DELETE'; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<!-- | |
The entry point for client. This file is loaded just once when the client is captured. | |
It contains socket.io and all the communication logic. | |
--> | |
<html> | |
<head> | |
<!-- %X_UA_COMPATIBLE% --> | |
<title>Karma</title> | |
<link href="favicon.ico" rel="icon" type="image/x-icon" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class klass { | |
constructor() {} | |
sum(...args) { | |
this.value = args.reduce((sum, current) => sum + current, 0); | |
return this; | |
} | |
add(value) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let myArr = [0, 2, 5] | |
let arr2 = [1, 6, 7] | |
// Attach a value to the end of an array | |
myArr.push(6) | |
console.log(myArr) // [0, 2, 5, 6] | |
// Attach a value to the beginning of an array | |
myArr.unshift(3) | |
console.log(myArr) // [3, 0, 2, 5, 6] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Promise = require('bluebird') | |
const _ = require('lodash') | |
// Include your dynogels models | |
let models = require('./routes/helpers/models') | |
// Include your mongoose models | |
let mongooseModels = require('./routes/helpers/mongooseModels') | |
module.exports = (settings, itemsMapping) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let dataSet = [{ | |
"survey_answers": [ | |
{ | |
"id": "9ca01568e8dbb247", // As they are, this is the key to groupBy | |
"option_answer": 5, // Represent the index of the choosen option | |
"type": "OPINION_SCALE" // Opinion scales are 0-10 (meaning elleven options) | |
}, | |
{ | |
"id": "ba37125ec32b2a99", | |
"option_answer": 3, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
list_of_numbers = [1, 2 , 1, 3] | |
def find_count_of_lowest(numbers): | |
numbers.sort() | |
lowest_number = numbers[0] | |
count_lowest_number = 0 | |
for number in numbers: | |
if number == lowest_number: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Numbers between | |
def numbers_between(numbers, min_range, max_range): | |
# Create empty list to contain our results | |
result = [] | |
# Run through each number | |
for number in numbers: | |
# If number is bigger or equal to min_range and bigger or equal to max_range | |
if number >= min_range and number <= max_range: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'intersection-observer'; | |
import scrollama from 'scrollama'; | |
const scroller = scrollama(); | |
// setup the instance, pass callback functions | |
scroller | |
.setup({ | |
step: settings.$refs.slide__item, |