Skip to content

Instantly share code, notes, and snippets.

View hervehobbes's full-sized avatar

Hervé hervehobbes

View GitHub Profile
@hervehobbes
hervehobbes / .gitignore
Last active December 11, 2015 10:08
.gitignore pour le dev
.buildpath
.project
.settings
www/
www_dev/medias/
www_dev/uploads
www_dev/baco/kcfinder/
www_dev/baco/phpimageeditor/
*.psd
*.bak
@hervehobbes
hervehobbes / gist:1c12bc78108a37511878
Created May 4, 2014 17:17
Comment obtenir l'emplacement du répertoire AppData\Roaming
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace appData
{
class Program
{
@hervehobbes
hervehobbes / gist:a06a9638302284578014
Created May 4, 2014 17:20
Iterators & Yield in C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace iterators
{
public class Products
{
<?php
error_reporting(E_ALL);
$currentInclude = ini_get('include_path');
ini_set('include_path', $currentInclude.";C:/dev/web/excel/Classes/");
require_once 'PHPExcel.php';
require_once 'PHPExcel/Writer/Excel2007.php';
$objPHPExcel = new PHPExcel();
<!DOCTYPE html>
<meta charset="utf-8">
<link rel="stylesheet" href="http://cmx.io/v/0.1/cmx.css">
<script src="http://cmx.io/v/0.1/cmx.js" charset="utf-8"></script>
<style>.cmx-user-scene4 .cmx-text-border .cmx-path {stroke: orange}</style>
<body>
<div style="max-width:900px; -webkit-transform:rotate(0deg)">
<scene id="scene1">
<label t="translate(0,346)">
private string removeNonAsciiChar(string content)
{
content = Regex.Replace(content.Trim(), @"[^\u0000-\u007F]", string.Empty);
return Encoding.ASCII.GetString(
Encoding.Convert(
Encoding.UTF8,
Encoding.GetEncoding(
Encoding.ASCII.EncodingName,
new EncoderReplacementFallback(string.Empty),
new DecoderExceptionFallback()
<?php
function curPageURL() {
$pageURL = 'http';
if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
$pageURL .= "://";
if ($_SERVER["SERVER_PORT"] != "80") {
$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
} else {
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
}
<?xml version="1.0" ?>
<project name="audit" basedir="." default="audit">
<property name="style" value="ZEND" />
<property name="test" value="${source}/../test" />
<property name="test-bootstrap" value="" />
<target name="prepare">
<mkdir dir="${out}" />
</target>
@hervehobbes
hervehobbes / AutoHotKey.ahk
Created May 24, 2015 09:39
Script AutoHotKey pour le travail
::cdt::
Send,
(
Cordialement,
Hervé
)
return
::cdta::
Send,
@hervehobbes
hervehobbes / extensions_chrome.html
Created May 24, 2015 09:41
Mes extension Google Chrome
Evernote
https://chrome.google.com/webstore/detail/evernote-web/lbfehkoinhhcknnbdgnnmjhiladcgbol?hl=fr
Extension Abonnement RSS
https://chrome.google.com/webstore/detail/rss-subscription-extensio/nlbjncdgjeocebhnmkbbbdekmmmcbfjd
HTML5 Storage Manager All in One
https://chrome.google.com/webstore/detail/html5-storage-manager-all/giompennnhheakjcnobejbnjgbbkmdnd
Instrumente