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
# syntax=docker/dockerfile:1 | |
# Definition of 'false': 'does nothing, unsuccessfully' (i.e. emits an error exit code) | |
FROM alpine as old-way | |
RUN \ | |
echo hello && \ | |
false && \ | |
echo goodbye |
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
#!/usr/bin/env jq | |
# Run with: | |
# -R (read raw strings, not JSON texts) | |
# -s (slurp all inputs into an array) | |
# i.e. jq -f solution.jq -R -s input.dat | |
# When initially read in, the input will look like this: | |
# "1000\n2000\n3000\n\n4000\n\n5000\n6000\n\n7000\n8000\n9000\n\n10000\n" |
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
# Output fields in a nicely arranged columnar format. | |
# Takes two optional variables: | |
# COLS: comma-separated list of column nrs (fields) to output (default: all) | |
# GAP: gap required between each column (default: 1) | |
# Take care of the GAP default | |
BEGIN { | |
if (GAP == "") GAP=1 | |
} |
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
const episodes = [ | |
{ | |
number: 1, | |
title: 'Setting up for our first challenge' | |
}, | |
{ | |
number: 2, | |
title: 'Fizz-Buzz and Fibonacci' | |
}, | |
{ |
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
// ----------------------------------------------------- | |
// Globals, contants | |
// ----------------------------------------------------- | |
TASKLIST = "DJ's list"; | |
LABEL_PENDING = "newtask"; | |
LABEL_DONE = "newtaskdone"; | |
// ----------------------------------------------------- | |
// getTasklistId_(tasklistName) | |
// Returns the id of the tasklist specified |
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
/** | |
* From previous conversions from WordPress to Ghost, I have a lot of posts | |
* with links to other posts, where the link is actually incorrect. The | |
* incorrect links are missing the day (dd) part of the URL. | |
* | |
* This script is a quick and dirty way of fixing them, in-place: | |
* 1) read all the posts, and work out a slug-to-anchor mapping | |
* 2) go through all the posts, using regexes to find incorrect links | |
* and replace them with the correct ones, referencing the mapping | |
* from the first step. |
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
{ | |
"routes": [ | |
{ | |
"path": "/d/pos", | |
"target": { | |
"type": "destination", | |
"name": "public-odata-services" | |
}, | |
"description": "Public OData Services" | |
}, |
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
#!/usr/bin/env node | |
var stdin = process.stdin, | |
stdout = process.stdout, | |
aConfigLines = [], | |
https = require('https'), | |
sDocuRoot = "https://help.hana.ondemand.com/webide/", | |
sDocuPage = "233396e994584fe9b4c7ab6cb2798640.html"; | |
// Read in current .eslintrc.ext config from STDIN |
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
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | |
<meta charset="UTF-8"> | |
<title>Relative Dates</title> | |
<script id="sap-ui-bootstrap" | |
type="text/javascript" |
NewerOlder