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
# install gh (https://cli.github.com), install jq (https://stedolan.github.io/jq/), then run | |
gh alias set --shell jobs "gh api /repos/:owner/:repo/actions/runs | jq '(\"Name\" + \" \" * 20)[:20] + \" | \" + (\"Commit\" + \" \" * 50)[:50] + \" | \" + (\"Status\" + \" \" * 20)[:10] + \" | Time \", (.workflow_runs[] | (.name + \" \" * 20)[:20] + \" | \" + (.head_commit.message + \" \" * 100)[:50] + \" | \" + (.status + \" \" * 20)[:10] + \" | \" + .updated_at)' | sed 's/\"//g'" | |
# in a GitHub repo run | |
gh jobs | |
# to se the most recent jobs and statuses |
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
/** | |
* Diagonal stripes | |
*/ | |
@import url(http://fonts.googleapis.com/css?family=Cabin+Sketch); | |
.button { | |
background: repeating-linear-gradient(150deg, white, white 2px, #08b 1px, #08b 3px); | |
display: inline-block; | |
border: 1px solid transparent; |
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
/** | |
* Cashdio | |
*/ | |
@import url(http://fonts.googleapis.com/css?family=Cabin+Sketch); | |
.button { | |
background: repeating-linear-gradient(150deg, white, white 2px, #08b 1px, #08b 3px); | |
display: inline-block; | |
border: 1px solid transparent; |
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
makeTransparentEmboss = (img) -> | |
canvas = document.createElement("canvas") | |
return [null, null] unless canvas.getContext | |
canvas.width = img.width | |
canvas.height = img.height | |
ctx = canvas.getContext("2d") | |
ctx.drawImage(img, 0, 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
# Traversing arrays and objects in CoffeeScript | |
# The array and object we use for testing | |
arr = [1, 2, 3, 4, 5] | |
obj = {a: 1, b: 2, c: 3, d: 4, e: 5} | |
# 'in' has a different meaning in CoffeeScript than in JavaScript | |
# CS: element in array -> JS: array.indexOf(element) >= 0 | |
console.log '5 in arr: ' + (5 in arr) |