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
{ | |
"url": "http://example.com/api/23/", | |
"author": 1, | |
"date_created": "2015-03-26T11:01:23.262391Z", | |
"date_updated": "2015-03-26T11:01:23.262391Z", | |
"html": "<form></form>", | |
"javascript": "<script></script>", | |
"form": { | |
"id": 123, | |
"method": "POST", |
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
{ | |
"url": "http://example.com/api/23/", | |
"author": 1, | |
"date_created": "2015-03-26T11:01:23.262391Z", | |
"date_updated": "2015-03-26T11:01:23.262391Z", | |
"html": "<form></form>", | |
"javascript": "<script></script>", | |
"form": { | |
"id": 123, | |
"method": "POST", |
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
merged_branches(){ | |
local red=`tput setaf 1` | |
local green=`tput setaf 2` | |
local bold=`tput bold` | |
local reset=`tput sgr0` | |
local current_branch=$(git rev-parse --abbrev-ref HEAD) | |
for branch in $(git branch --merged | cut -c3-) | |
do | |
if [[ $branch = $current_branch ]]; then |
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 cats._ | |
import cats.syntax.flatMap._ | |
import cats.syntax.functor._ | |
import cats.syntax.applicative._ | |
def sumSquare[F[_]: Monad](a: F[Int], b: F[Int]): F[Int] = { | |
a.flatMap(x => b.map(y => x*x + y*y)) | |
} | |
import cats.instances.list._ |
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 cats._ | |
val eager = Eval.now { | |
println("Hey !! I am eager eval") | |
"Hello Eval Eager" | |
} | |
val lazyEval = Eval.later { | |
println("Hey !! I am lazy eval") | |
"Hello Eval Lazy" |
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(){ | |
var _products = {}; | |
if(!window.SwymCallbacks){window.SwymCallbacks = [];} | |
window.SwymCallbacks.push(function(){ | |
_swat.fetchWrtEventType(function(products){ | |
// render products - array of objects with same structure as productData | |
// {{Insert your rendering function}} | |
renderProducts(products); | |
// products count - products.length | |
// {{Insert your count update}} |