Here's a live demo http://dogdash.herokuapp.com/
Code example: https://github.com/bennycwong/dogdash
Dashing widget to display a random gif from reddit
Here's a live demo http://dogdash.herokuapp.com/
Code example: https://github.com/bennycwong/dogdash
Dashing widget to display a random gif from reddit
| fizzbuzz = fn | |
| 0, 0, _ -> "FizzBuzz" | |
| 0, _, _ -> "Fizz" | |
| _, 0, _ -> "Buzz" | |
| _, _, n -> n | |
| end | |
| fb = fn | |
| n -> fizzbuzz.( rem(n,3) , rem(n,5) , n) |> IO.puts | |
| end |
| defmodule Array do | |
| def sum([]) do | |
| 0 | |
| end | |
| def sum([ head | tail ]) do | |
| head + sum(tail) | |
| end | |
| git branch | grep -v master | xargs -n 1 git branch -D | |
| git brach list branches | |
| grep -v is a filter | |
| xargs -n 1 pass in the arguments | |
| git branch -D is the command. |
| #!/bin/sh | |
| while : | |
| do | |
| zone=$(sonos list-zones 2>&1 | head -n 1) | |
| sonos-cli --zone $zone volume [0] | |
| sonos-cli --zone $zone stop | |
| sleep 1 | |
| done |
| #put oids in here | |
| oids = %w( | |
| ) | |
| orders = Order.where(id: oids).where(status: 'canceled_by_seller_review'); |