Skip to content

Instantly share code, notes, and snippets.

@kristopherjohnson
kristopherjohnson / HexDump.cpp
Last active May 2, 2023 05:43
Hex and ASCII dump in C++
#include "HexDump.h"
#include <fstream>
#include <iostream>
int main(int argc, const char* argv[])
{
if (argc < 2) {
HexDump::dumpStream(std::cout, std::cin);
}
@nicktoumpelis
nicktoumpelis / repo-rinse.sh
Created April 23, 2014 13:00
Cleans and resets a git repo and its submodules
git clean -xfd
git submodule foreach --recursive git clean -xfd
git reset --hard
git submodule foreach --recursive git reset --hard
git submodule update --init --recursive
@LeSpocky
LeSpocky / rounded_corner.scad
Last active June 27, 2024 18:31
rounded square in openscad
module rounded_square( width, radius_corner ) {
translate( [ radius_corner, radius_corner, 0 ] )
minkowski() {
square( width - 2 * radius_corner );
circle( radius_corner );
}
}
module alternative_square( width, r_c ) {
hull() {