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
/* | |
This widget shows Recent Posts on your Tumblr blog. | |
Its dependency is jQuery. | |
Usage: | |
1) Add html: | |
<div id="recent-posts"></div> | |
2) Add code into the <head>: |
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
/* | |
This widget sets language and shows Recent Posts on your Tumblr blog. | |
Its dependency is jQuery. | |
Usage: | |
1) Add html: | |
<div id="recent-posts"></div> | |
2) Add code before closing </body> tag |
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
// Flexbox Playground: Visual Guide To Flexbox | |
// https://scotch.io/demos/visual-guide-to-css3-flexbox-flexbox-playground | |
// http://www.flexboxdefense.com/ | |
// http://flexboxfroggy.com/ | |
// http://flexboxin5.com/ | |
// Use flexbox while supporting older Internet Explorers | |
// https://github.com/10up/flexibility/ |
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
// config | |
$_color-base-grey: rgb(229,231,234); | |
$palettes: ( | |
purple: ( | |
base: rgb(42,40,80), | |
light: rgb(51,46,140), | |
dark: rgb(40,38,65) | |
), | |
grey: ( | |
base: $_color-base-grey, |
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
'use strict'; | |
import React, { | |
AppRegistry, | |
Component, | |
StyleSheet, | |
Text, | |
View, | |
TouchableOpacity, | |
LayoutAnimation, | |
} from 'react-native'; |
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
https://bethallchurch.github.io/JavaScript-and-Functional-Programming/ | |
//////////////// | |
var add = (x, y) => x + y | |
var square = (x) => x * x | |
var addThenSquare = (x, y) => square(add(x, y)) |
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 getListFromSearch = search => | |
search | |
|> Js.String.split("&") | |
|> Array.to_list; | |
let parseUrlSearch = (stringToBeFound, search) => | |
switch (search |> getListFromSearch |> List.find(stringToBeFound |> Js.String.startsWith)) { | |
| item => item |> Js.String.replace(stringToBeFound, "") | |
| exception Not_found => "" | |
}; |
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
/** | |
* Making promises | |
*/ | |
let okPromise = Js.Promise.make((~resolve, ~reject as _) => [@bs] resolve("ok")); | |
/* Simpler promise creation for static values */ | |
Js.Promise.resolve("easy"); | |
Js.Promise.reject(Invalid_argument("too easy")); |