Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am amdg2 on github.
  • I am amdg2 (https://keybase.io/amdg2) on keybase.
  • I have a public key ASC2zoJXO6vvnsYzy3thbRKbIA0G6RpfKVANHkTVCWCDrQo

To claim this, I am signing this object:

package hotelManager.utils;
/**
* OSValidator class
*/
public class OSValidator {
private static String OS = System.getProperty("os.name").toLowerCase();
public static boolean isWindows() {
@AMDG2
AMDG2 / designer.html
Last active August 29, 2015 14:08
designer
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
@AMDG2
AMDG2 / file.cpp
Created July 29, 2014 13:51
How to convert std::string to std::wstring
#include <sstream>
#include <string>
// Works also with accentued characters
std::string hello("Hello World !");
std::wsstringstream ws;
ws << hello.c_str();
std::wstring wname = wss.str();
@AMDG2
AMDG2 / index.php
Last active August 29, 2015 14:00
Simple wrapper to use http://www.simplehtmltopdf.com API
<?php
/*
* This is page just test the API Wrapper.
*/
if(isset($_POST['url'])) {
include("simplehtmltopdf-api.php");
$api = new SimpleHTMLToPDF();
$api->display(urldecode($_POST["url"]));
#include <ncurses.h>
#include <stdlib.h>
#include <string.h>
#define ESC 27
int hB = 4, wB, xB, yB = 0; // parametre fenetre basse
int hG, wG, xG = 0, yG = 0; // parametre fenetre gauche
int hD, wD, xD, yD = 0; // parametre fenetre droite
@AMDG2
AMDG2 / gdb backtrace
Last active December 24, 2015 08:09
LibreOffice debug
#0 0x00007ffff36209f4 in Menu::GetItemCount() const () from /usr/lib/libreoffice/program/libvcllo.so
#1 0x00007fffdcaf08b0 in ?? () from /usr/lib/libreoffice/program/../program/libfwklo.so
#2 0x00007fffdcafbc38 in ?? () from /usr/lib/libreoffice/program/../program/libfwklo.so
#3 0x00007ffff362507f in Menu::Activate() () from /usr/lib/libreoffice/program/libvcllo.so
#4 0x00007ffff362e321 in ?? () from /usr/lib/libreoffice/program/libvcllo.so
#5 0x00007ffff368e2eb in ?? () from /usr/lib/libreoffice/program/libvcllo.so
#6 0x00007ffff368f04c in ?? () from /usr/lib/libreoffice/program/libvcllo.so
#7 0x00007fffe6f0bcb7 in ?? () from /usr/lib/libreoffice/program/libvclplug_gtklo.so
#8 0x00007fffe6695345 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#9 0x00007fffef062458 in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0