This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// à mettre dans le fichier functions.php | |
// create a new category in Media Library for PDF file type | |
function modify_post_mime_types( $post_mime_types ) { | |
// select the mime type, here: 'application/pdf' | |
// then we define an array with the label values | |
$post_mime_types['application/pdf'] = array( __( 'PDFs' ), __( 'Manage PDFs' ), _n_noop( 'PDF <span class="count">(%s)</span>', 'PDFs <span class="count">(%s)</span>' ) ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once('libs/simple_html_dom.php'); | |
$url = "http://gabrielvivas.com"; | |
$html = file_get_html($url); | |
foreach($html->find('img') as $element) { | |
echo $element->src; | |
echo "<img src='$element->src'><br />"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- scripts --> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> | |
<script>window.jQuery || document.write('<script src="jquery-1.7.2.min.js"><\/script>')</script> | |
<!-- /scripts --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* http://paulirish.com/2012/box-sizing-border-box-ftw/ */ | |
*, *:before, *:after { | |
-webkit-box-sizing: border-box; | |
-moz-box-sizing: border-box; | |
box-sizing: border-box; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"files": | |
{ | |
"html5shiv": "http://html5shiv.googlecode.com/svn/trunk/html5.js", | |
"jquery": "http://code.jquery.com/jquery.min.js", | |
"jquery ui": "http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/jquery-ui.min.js", | |
"normalize": "http://necolas.github.com/normalize.css/2.1.1/normalize.css", | |
"prefixfree": "https://raw.github.com/LeaVerou/prefixfree/gh-pages/prefixfree.min.js", | |
"reset": "http://meyerweb.com/eric/tools/css/reset/reset.css", | |
"respond": "https://raw.github.com/scottjehl/Respond/master/respond.min.js" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// in folder, to setup repository | |
git init | |
// first time setup | |
git config --global color.ui true | |
git config --global user.name "name" | |
git config --global user.email "[email protected]" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="fr"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Table results</title> | |
<style> | |
body { margin: 20px; font: 1em/1.5 Geneva, sans-serif; } | |
table, td { border: 1px solid #bbb; border-collapse: collapse; } | |
td { padding: 5px 10px; } th { padding: 15px 10px; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "phpunit", | |
"description": "PHPUnit Composer Package", | |
"require": { | |
"phpunit/phpunit": "3.7.*" | |
}, | |
"config": { | |
"bin-dir": "/usr/local/bin/" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
By Marco Arment <[email protected]>. | |
This code is released in the public domain. | |
THERE IS ABSOLUTELY NO WARRANTY. | |
Usage example: | |
// In a registration or password-change form: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// method A : uses uri string, like 'localhost' | |
// change settings if on local or remote | |
// lets you share the same config file in dev and prod | |
if (strpos($_SERVER['HTTP_HOST'], 'localhost') === false) { | |
// production | |
define('DB_NAME', 'database'); |
OlderNewer