This file contains hidden or 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
echo "letter" | tr '[:upper:]' '[:lower:]' | sed -e "s/\([a-z]\)/:letter-\1:/g" | |
echo "comic sans" | tr '[:upper:]' '[:lower:]' | sed -e "s/\([a-z]\)/:comicsans-\1:/g" | |
echo "fancy" | tr '[:upper:]' '[:lower:]' | sed -e "s/\([a-z]\)/:fancy-\1:/g" | |
echo "regional" | tr '[:upper:]' '[:lower:]' | sed -e "s/\([a-z]\)/:regional_indicator_\1:/g" |
This file contains hidden or 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
# EditorConfig is awesome: https://EditorConfig.org | |
# top-most EditorConfig file | |
root = true | |
# Unix-style newlines with a newline ending every file | |
[*] | |
end_of_line = lf | |
insert_final_newline = true | |
trim_trailing_whitespace = true |
This file contains hidden or 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
# The compiler to use | |
CC = g++ | |
# The compiler flags to use | |
CPPFLAGS = -pedantic -Wall -O2 -g -std=c++11 | |
# the name of the outputed executable binary | |
EXENAME = main | |
# the directory to output objects to. (use . for current dir) | |
OUTDIR = . |
This file contains hidden or 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 newHostname = window.location.hostname.replace(/\./g, "-"); | |
const newUrl = `${window.location.protocol}//${newHostname}.proxy.library.adelaide.edu.au${window.location.port}${window.location.pathname}${window.location.search}${window.location.hash}`; | |
window.location = newUrl; |
This file contains hidden or 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
04fa11109e59b544692473cdb500f74d1b47f7e92b98e263438738d1926069003c622726d7b8f9fea7ef844cdb03e73149aefdce20a3664425e930a43db642c9d0 |
This file contains hidden or 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
/** | |
* Jake Lane <me@jakelane.me> | |
* | |
* Basic Quicksort implementation | |
*/ | |
#include <vector> | |
#include <iostream> | |
#include <algorithm> | |
#include <sstream> |
This file contains hidden or 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
// A asynchronous function that has a string and a callback parameter | |
function asynchronousFunction(text, callback) { | |
console.log("The asynchronous function has been called and is about to callback"); | |
// Run the callback function (from the parameters) | |
callback(text); | |
} | |
console.log("The asynchronous function is about to be called"); | |
// This is a call to the asynchronous function (note that the function is the second parameter) |
This file contains hidden or 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
// Helper Library header | |
// Author: Jake Lane | |
#ifndef HELPERS_H_ | |
#define HELPERS_H_ | |
class Helpers { | |
public: | |
// Helper function to convert int to string | |
template <typename T> |
This file contains hidden or 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
{ | |
"tests": [ | |
{ | |
"description": "Description of test case", | |
"input": "Input", | |
"expectedout": "Expected output (compared to actual output)" | |
}, | |
{ | |
"description": "Test with different directory (runs binary inside the folder)", | |
"directory": "tests/test4", |
This file contains hidden or 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
template <typename T, std::size_t N> | |
std::size_t size(T const (&)[N]) { | |
return N; | |
} |