Skip to content

Instantly share code, notes, and snippets.

View rm--'s full-sized avatar

René rm--

View GitHub Profile
@rm--
rm-- / custom-wishlist-page.js
Created April 6, 2021 12:22 — forked from aravindbaskaran/custom-wishlist-page.js
Swym Wishlist Plus - Custom Wishlist UX for your site - An example using the Supply theme
(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}}
@rm--
rm-- / EvalExample1.scala
Last active October 26, 2018 11:29 — forked from harmeetsingh0013/EvalExample1.scala
scratch file
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"
@rm--
rm-- / IdExample1.scala
Last active October 26, 2018 10:44 — forked from harmeetsingh0013/IdExample1.scala
scratch file
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._
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
{
"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",
@rm--
rm-- / hopper_api.json
Last active August 29, 2015 14:18 — forked from keimlink/hopper_api.json
each level needs a weight
{
"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",