Skip to content

Instantly share code, notes, and snippets.

Nicolas Sorosac nsorosac

Block or report user

Report or block nsorosac

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@nsorosac
nsorosac / wp-cli-unit-test-data-import.sh
Created Apr 4, 2018
WP-CLI : unit test data import
View wp-cli-unit-test-data-import.sh
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
@nsorosac
nsorosac / dppx-viewport.js
Last active Feb 15, 2016
Hi-DPI devices viewport
View dppx-viewport.js
// <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>
View SMS.php
<?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;
View recaptcha.php
<?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
View Date.French.js
/*
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', {
You can’t perform that action at this time.