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 React from 'react'; | |
var GLYPHS = { | |
CHECK: require('../icons/check-1.svg'), | |
CHECK_CIRCLE: require('../icons/check-circle-1.svg'), | |
CHECK_SHIELD: require('../icons/check-shield.svg') | |
}; | |
/* | |
Ex: |
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
<slider content="sliderContent"></slider> |
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
var DynamoBackup = require('dynamo-backup-to-s3'); | |
var schedule = require('node-schedule'); | |
var config = require('config'); | |
schedule.scheduleJob('0 */12 * * *', backupS3); | |
function backupS3() { | |
var backup = new DynamoBackup({ | |
readPercentage: .25, // 25% read capacity | |
bucket: 'navnPåBucket', |
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
(function() { | |
'use strict'; | |
var modules = []; | |
angular | |
.module('factory.ls', modules) | |
.factory('Ls', Ls); | |
function Ls() { |
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
(function() { | |
'use strict'; | |
var modules = []; | |
angular | |
.module('directive.whenScrolled', modules) | |
.directive('whenScrolled', whenScrolled); | |
function whenScrolled() { |
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
(function() { | |
'use strict'; | |
angular | |
.module('factory.Excel', []) | |
.factory('Excel', Excel); | |
function Excel($document, $window) { | |
return { | |
create: create |
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
# So first we def (define) the function and giving it | |
# the name increment, and adding one parameter | |
# i call that number_to_increment because its | |
# the number that you want to increment by 1 | |
def increment(number_to_increment): | |
# Then we return the number_to_increment + 1 | |
# So if the number_to_increment is 3 it will return 4, if number_to_increment is 500 it will return 501 | |
return number_to_increment + 1 | |
# Here we test the function works |
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
# We need to count the occurance of words in a text | |
def count_word_in_text(text, word_to_count_by): | |
# We first have the text and then we run a "count" method on the text | |
# then we parse the word_to_count_by | |
return text.count(word_to_count_by) | |
# Now we add a string of text we want to count the occurances of a certain word in | |
# Secound paramater is the word we want to count | |
count_of_words = count_word_in_text("Hello world, its a great day in this world", "world") |
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
# First we def (define) a function that takes 2 arguments: | |
# 1. argument is the text to look for occurances | |
# 2. argument is the word_to_count | |
def count_word_in_text(text, word_to_count): | |
# The count of our word that we're counting | |
count = 0 | |
# The text index looking from | |
start = 0 |
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, |