Skip to content

Instantly share code, notes, and snippets.

View mcarbonneaux's full-sized avatar

CARBONNEAUX Mathieu mcarbonneaux

View GitHub Profile
@mcarbonneaux
mcarbonneaux / SVN_Git_Mirror.md
Created April 25, 2016 12:04 — forked from ticean/SVN_Git_Mirror.md
SVN Git Mirror

Create Git Mirror from SVN Repository

This guide will demonstrate how to mirror an SVN into a Git repo. You're the target audience if you're an SVN user, just getting started with Git and need to coax your project team over to Git.

The branching scenario has been simplified for clarity.

References

@mcarbonneaux
mcarbonneaux / putty.bat
Created September 24, 2016 21:37 — forked from sbiffi/putty.bat
The aim of this vbs script is to launch putty using an URL like ssh://login@host directly from a browser. The .bat is almost the same than .vbs but less robust and just their for older systems.
:: This version is not as powerfull as vbs version, please prefere the other one.
:: It's just there if you need a non-visual basic way to perform this.
:: Restrictions:
:: - Password cannot contain a % or finish with @
:: - Chrome adds a / at the end of the URL, not yet managed
:: The aim of this script is to execute putty with parameters like ssh://login@host
:: Installation:
:: - Launch putty.reg to associate ssh:// and telnet:// to this script
:: - Edit the putty path in parameter below like puttyPath="C:\Program Files (x86)\putty.exe"
http://stackoverflow.com/questions/10866311/getmessage-with-a-timeout
```
BOOL GetMessageWithTimeout(MSG *msg, UINT to)
{
BOOL res;
UINT_PTR timerId = SetTimer(NULL, NULL, to, NULL);
res = GetMessage(msg);
KillTimer(NULL, timerId);
@mcarbonneaux
mcarbonneaux / browser-render.thml
Last active March 5, 2017 20:34
JSON Resume Browser Render
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>CV</title>
<script src="https://code.jquery.com/jquery-1.9.1.min.js"></script>
<script>
$(document).ready(function($) {
var theme = "flat";
@mcarbonneaux
mcarbonneaux / index.php
Last active March 5, 2017 20:39
PHP Json Resume render.
<?php
$resume_time = lstat("resume.json");
if ( is_array($resume_time) )
{
$resume_mt=gmdate('D, d M Y H:i:s ', $resume_time["mtime"]) . 'GMT';
$if_modified_since = isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) ? $_SERVER['HTTP_IF_MODIFIED_SINCE'] : false;
if (($if_modified_since && $if_modified_since == $resume_mt))
{

on domU resize the volume with lvm.

# lvs
  LV               VG      Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  vm-centos-hvm-lv sharevg -wi-ao---- 450.00g
# lvextend -L +100G /dev/sharevg/vm-centos-hvm-lv
# lvs
  LV               VG      Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
 vm-centos-hvm-lv sharevg -wi-ao---- 550.00g
@mcarbonneaux
mcarbonneaux / gist:fc2f7f29d51660335d6be3aaa9bd5f89
Created August 23, 2017 08:18 — forked from leftclickben/gist:322b7a3042cbe97ed2af
Steps to migrate from SVN to GitLab

Steps to migrate from SVN to GitLab

This process worked for me. I take no responsibility for any damage or loss incurred as a result of following or not following these steps or, for that matter, anything else you might do or not do.

Setup

  • SVN is hosted at svn.domain.com.au.
  • SVN is accessible via http (other protocols should work).
  • GitLab is hosted at git.domain.com.au and:
@mcarbonneaux
mcarbonneaux / FastImportRewriter.cs
Created August 23, 2017 08:22 — forked from davidroth/FastImportRewriter.cs
Fast-Import / Fast-Export Rewriter to migrate bazaar bugtracking metdata properties to git. More infos: http://www.fusonic.net/en/blog/migrating-from-bazaar-to-git/ Licence: Mit X11 / BSD
// Fast-Import / Fast-Export Rewriter to migrate bazaar bugtracking metdata properties to git.
// More infos: http://www.fusonic.net/en/blog/migrating-from-bazaar-to-git/
// Licence: Mit X11 / BSD
using System;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
using System.Text;
using System.Diagnostics;
using System.Collections.Generic;
#!/usr/bin/env python
"""Launchpad to github bug migration script.
There's a ton of code from Hydrazine copied here:
https://launchpad.net/hydrazine
WARNING: this code was written for the Github issues v2 API, and has *not* been ported to v3. If anyone finds it useful and ports it, please drop me a pull request.
Usage
-----
@mcarbonneaux
mcarbonneaux / cl_clean.yaml
Created January 22, 2019 13:33 — forked from mrqwer88/cl_clean.yaml
clean old partitions in clickhouse
databases:
- logs: 7
- vms: 9
- statistics: 20
connect_line: '127.0.0.1'
log_file: 'cl_clean_partitions.log'