Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View vtellier's full-sized avatar

Vincent Tellier vtellier

View GitHub Profile
@sanjid133
sanjid133 / Install etcd On Ubuntu 16.04.md
Last active March 23, 2021 09:33
Install etcd On Ubuntu 16.04/18.04
#!/bin/bash
ETCD_VERSION=${ETCD_VERSION:-v3.3.1}
curl -L https://github.com/coreos/etcd/releases/download/$ETCD_VERSION/etcd-$ETCD_VERSION-linux-amd64.tar.gz -o etcd-$ETCD_VERSION-linux-amd64.tar.gz
tar xzvf etcd-$ETCD_VERSION-linux-amd64.tar.gz
rm etcd-$ETCD_VERSION-linux-amd64.tar.gz
cd etcd-$ETCD_VERSION-linux-amd64
@vidavidorra
vidavidorra / auto-deploy_documentation.md
Last active February 19, 2023 17:37
Auto-deploying Doxygen documentation to gh-pages with Travis CI

Auto-deploying Doxygen documentation to gh-pages with Travis CI

This explains how to setup for GitHub projects which automatically generates Doxygen code documentation and publishes the documentation to the gh-pages branch using Travis CI. This way only the source files need to be pushed to GitHub and the gh-pages branch is automatically updated with the generated Doxygen documentation.

Sign up for Travis CI and add your project

Get an account at Travis CI. Turn on Travis for your repository in question, using the Travis control panel.

Create a clean gh-pages branch

To create a clean gh-pages branch, with no commit history, from the master branch enter the code below in the Git Shell. This will create a gh-pages branch with one file, the README.md in it. It doesn't really matter what file is uploaded in it since it will be overwritten when the automatically generated documentation is published to th

@waffle2k
waffle2k / cpplog.cpp
Created March 26, 2014 19:54
Example of using the c++ logging
std::clog.rdbuf(new log::FileLog("/dev/stderr"));
if (char *l = getenv("DEBUGLOG")){
if (0==strcmp("syslog",l)){
std::clog.rdbuf(new log::SysLog(argv[0], LOG_LOCAL0));
}
else {
// Assign it to the supplied file
std::clog.rdbuf(new log::FileLog(l));
}
@mikelehen
mikelehen / timestamped-console-log.js
Created April 16, 2013 19:06
Wraps console.log to include a timestamp (in seconds since the wrapper was initialized) with every log message.
console.log = (function() {
var console_log = console.log;
var timeStart = new Date().getTime();
return function() {
var delta = new Date().getTime() - timeStart;
var args = [];
args.push((delta / 1000).toFixed(2) + ':');
for(var i = 0; i < arguments.length; i++) {
args.push(arguments[i]);
@arq5x
arq5x / test.sh
Last active November 30, 2023 12:50
Compress and then Decompress a string with zlib.
# compile
$ g++ zlib-example.cpp -lz -o zlib-example
# run
$ ./zlib-example
Uncompressed size is: 36
Uncompressed string is: Hello Hello Hello Hello Hello Hello!
----------
@19h
19h / reset.js
Created February 19, 2013 22:51
Node.js — Clear Terminal / Console. Reset to initial state.
console.reset = function () {
return process.stdout.write('\033c');
}
@Wunkolo
Wunkolo / Logger.cpp
Created December 23, 2012 20:23
Logger
#include "Logger.h"
#include <iostream>
#include <stdio.h>
#include <time.h>
#include <sstream>
#include <stdarg.h>
void Logger::SetLogFile(const std::string FileName)
{
sFileName = FileName;