Skip to content

Instantly share code, notes, and snippets.

View nsorosac's full-sized avatar

Nicolas Sorosac nsorosac

  • Saint-Etienne, France
View GitHub Profile
/*
Script: Date.French.js
Date messages in French by Nicolas Sorosac
License:
http://www.clientcide.com/wiki/cnet-libraries#license
*/
MooTools.lang.set('FR', 'Date', {
<?php
define('RECAPTCHA_PUBLIC_KEY', '');
define('RECAPTCHA_PRIVATE_KEY', '');
// Formulaire
<script src="https://www.google.com/recaptcha/api.js"></script>
<div class="g-recaptcha" data-sitekey="<?php echo RECAPTCHA_PUBLIC_KEY; ?>"></div>
// Validation du post
@nsorosac
nsorosac / SMS.php
Last active September 1, 2015 08:28
<?php
class SMS_OVH
{
const SMS_SOAPI_VERSION = '1.63';
const SMS_LOGIN = 'xxxxxxxxxx';
const SMS_PASS = 'xxxxxxxxxx';
const SMS_ACCOUNT = 'xxxxxxxxxx';
const SMS_FROM = 'xxxxxxxxxx';
const SMS_NO_STOP = true;
@nsorosac
nsorosac / dppx-viewport.js
Last active February 15, 2016 07:18
Hi-DPI devices viewport
// <HiDPI_viewport_compatibility>
if (typeof window.devicePixelRatio != 'undefined') {
var scale = 1 / (window.devicePixelRatio || 1);
if (scale != 1) {
document.querySelector('meta[name="viewport"]').setAttribute('content',
'width=device-width, initial-scale=' + scale + ', minimum-scale=' + scale);
}
}
// </HiDPI_viewport_compatibility>
@nsorosac
nsorosac / wp-cli-unit-test-data-import.sh
Created April 4, 2018 13:25
WP-CLI : unit test data import
curl -O https://wpcom-themes.svn.automattic.com/demo/theme-unit-test-data.xml
wp plugin install wordpress-importer --activate
wp import ./theme-unit-test-data.xml --authors=create
rm theme-unit-test-data.xml