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
#!/bin/bash | |
set -euo pipefail | |
MATTERMOST_URL="http://mattermost.qwant.loc" | |
MATTERMOST_API_URL="$MATTERMOST_URL/api/v4" | |
header_file=/tmp/header | |
body_file=/tmp/body | |
function request # ENDPOINT CURL_ARGUMENTS... |
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
#!/bin/bash | |
set -euo pipefail | |
# Usage: | |
# docker-service-run --tty alpine ls | |
# | |
function docker-service-wait # SERVICE | |
{ | |
local interval=0.5s |
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
import pkg | |
assert pkg.foo == 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
/* | |
* graph.c | |
*/ | |
#include <stdlib.h> | |
#include <string.h> | |
#include "graph.h" | |
#include "list.h" | |
#include "set.h" | |
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
#pragma once | |
#include <cassert> | |
#include <iterator> | |
#include <algorithm> | |
using std::equal; | |
using std::distance; | |
using std::copy; | |
namespace Project2 | |
{ |
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
struct Foo { int i; }; | |
int main() | |
{ | |
Foo t(); | |
t.i = 7; | |
} |
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
#pragma once | |
#include <iterator> | |
// Represents all integer values in the range [low, high). | |
// low must be <= high. | |
template <typename Int> | |
struct IntegerRange | |
{ | |
struct iterator : public std::iterator<std::input_iterator_tag, Int> | |
{ |
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
#pragma once | |
#include <cassert> | |
// compress accepts a forward iterator range [first, last) and an output iterator. | |
// compress copies the elements from the iterator range to the output iterator | |
// eliminating all consecutive duplicates. | |
template <typename ForwardIterator, typename OutputIterator> | |
void compress(ForwardIterator first, const ForwardIterator last, OutputIterator result) | |
{ | |
if (first != last) |
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
#include <stdlib.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <alloca.h> | |
#include <assert.h> | |
#include "heap.h" | |
typedef struct Person_ | |
{ |
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
/*=========================================================================== | |
* Project #1 - CSE40478 | |
*===========================================================================*/ | |
#include <sstream> | |
#include <stdexcept> | |
#include <string> | |
using namespace std; | |
#include "UnitTest++.h" |
NewerOlder