Skip to content

Instantly share code, notes, and snippets.

View clemherreman's full-sized avatar

Clement Herreman clemherreman

  • Exotec
  • Lille, France
View GitHub Profile
@clemherreman
clemherreman / docker-https.md
Created January 22, 2018 10:39 — forked from zalexki/docker-https.md
Docker Apache2.4 HTTPS

Open port 443 on container, with a docker-compose file just add :

ports:
  - 443:443

Add virtualhost config :

Listen 443 https
  
@clemherreman
clemherreman / script.js
Created September 18, 2012 09:58 — forked from ClementDuez/script.js
Adding an event handler to an already initialized jQuery UI datepicker
// Adds an event handler
$('#my_datepickerized_field').datepicker( 'option' , 'onSelect', function (date) { // 'onSelect' here, but could be any datepicker event
$(this).change(); // Lauch the "change" evenet of the <input> everytime someone click a new date
});
@clemherreman
clemherreman / gist:2732582
Created May 19, 2012 22:23
List table indexes
SELECT
s.index_name AS name,
s.column_name,
s.non_unique AS `unique`,
c.constraint_type
FROM information_schema.statistics s
LEFT JOIN information_schema.table_constraints c
ON (
s.index_name = c.constraint_name
)
@clemherreman
clemherreman / random_sign.js
Created November 10, 2011 13:43 — forked from robink/random_sign.js
-1 | 1
var randomSign = function() {
return (Math.random() > 0.5) ? 1 : -1;
};
@clemherreman
clemherreman / Action.class.php
Created November 3, 2011 15:59 — forked from n1k0/Action.class.php
Class action
<?php
class Action implements NeedThePolice
{
public function askHelp()
{
return $this->goFuckYourself();
}
private function goFuckYourself()