Skip to content

Instantly share code, notes, and snippets.

View MartinDelille's full-sized avatar
🗿
Got into modular

Martin Delille MartinDelille

🗿
Got into modular
View GitHub Profile
# `pg` with no arguments ping the IP 8.8.8.8 (usefull for basic internet connection test),
# otherwise ping the given IP. If the IP is incomplete, it is concat with the default
# prefix 192.168.1 allowing easy local ping (eg ping 3.12 => 192.168.3.12)
function pg() {
ip4regex='^[0-9]+[.][0-9]+[.][0-9]+[.][0-9]+$'
ip3regex='^[0-9]+[.][0-9]+[.][0-9]+$'
ip2regex='^[0-9]+[.][0-9]+$'
ip1regex='^[0-9]+$'
host=$@
if [[ $# == 0 ]]; then
@MartinDelille
MartinDelille / main.cpp
Created May 1, 2014 16:38
Encoding test around œ
/**
* Copyright (C) 2012-2014 Phonations
* License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher
*/
#include <QFileInfo>
#include <QDebug>
#include <QTextCodec>
#include <QDir>
#include <QDomDocument>
# constants
COMPILER = "g++"
EXEC = "hello"
FLAGS = "-Wall -Wextra"
OBJECTS = ['hello.o', 'add.o']
file 'hello' => OBJECTS
# tasks
@MartinDelille
MartinDelille / enum.cs
Created August 1, 2012 09:15
Enumerating an enum
foreach (Suit suit in Enum.GetValues(typeof(Suit)))
{
// ...
}
<h1>Liberapay</h1>
Verifying that +martindelille is my blockchain ID. https://onename.com/martindelille
swagger: "2.0"
info:
description: "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters."
version: "1.0.0"
title: "Swagger Petstore"
termsOfService: "http://swagger.io/terms/"
contact:
email: "apiteam@swagger.io"
license:
name: "Apache 2.0"
# Uncrustify 0.60
set FOR foreach
#
# General options
#
# The type of line endings
newlines = auto # auto/lf/crlf/cr
@MartinDelille
MartinDelille / qtyaml.h
Created April 24, 2020 10:13 — forked from brcha/qtyaml.h
Qt Yaml support using yaml-cpp library
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 2.0
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* ***** END LICENSE BLOCK ***** */
/*