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 | |
/* Remove an old shortcode. | |
* Code by @boiteaweb | |
*/ | |
/* | |
* Exemple: | |
* [button color="babyblue" link="http://manoz.fr/facebook-template/2012-Facebook-template.zip" target="_blank"]Télécharger le template[/button] | |
*/ | |
add_shortcode( 'button', 'sc_button' ); |
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
$("pre code:contains($)").html(function(_, html) { | |
return html.replace(/\$+/ig, '<span class="red">$</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
$(document).click(function(event) { | |
if ($('.popup-content').is(":visible")) { | |
$('.popup-content').fadeOut('slow', function() {}) | |
} | |
}); | |
$('#popup').click(function(event) { | |
if ($('.popup-content').is(":visible")) { | |
$('.popup-content').fadeOut('slow', function() {}) | |
} else { |
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
.spinner-icon { | |
width: 14px; | |
height: 14px; | |
border: solid 2px transparent; | |
border-top-color: #5bcad3; | |
border-left-color: #5bcad3; | |
border-radius: 10px; | |
-webkit-animation: spinner-anim 400ms linear infinite; | |
-moz-animation: spinner-anim 400ms linear infinite; | |
-o-animation: spinner-anim 400ms linear infinite; |
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
<body> | |
<div class="content"> | |
<h1>Administration, lol</h1> | |
<div class='main'> | |
<?php | |
$server = 'localhost'; // Server de votre bdd | |
$username = 'tutogeoloc'; // Nom d'utilisateur | |
$password = 'password'; // Mot de passe | |
$database = 'tuto-geoloc'; // Nom de la bdd |
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
/** | |
* This function is the same as str_replace but once | |
* A small warning: this has not been tested in RSS feeds. | |
* Thx @ScreenFeedFr for the hack | |
* @link https://twitter.com/ScreenFeedFr/status/492056927745343489 | |
* @param string $search Value being searched for. | |
* @param string $replace Replacement value | |
* @param string $subject String being searched and replaced | |
* @param boolean $rev I don't fucking know what this var do :) | |
* @return string Replaced value |
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
// Keyframe animations | |
// # Use: `@include animation('ANIM_NAME DURATION ITERATION_COUNT');` | |
@mixin keyframes($animation-name) { | |
@-webkit-keyframes $animation-name { | |
@content; | |
} | |
@-moz-keyframes $animation-name { | |
@content; | |
} |
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 default, WordPress add a .bypostauthor class on comments | |
* I prefer echo something to have a better control in CSS. | |
* Exemple: http://codepen.io/Creaticode/full/ijExL | |
*/ | |
global $post; | |
if ( $comment->user_id === $post->post_author ) { | |
echo '<span class="is-author">Author</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
Show hidden characters
{ | |
"bold_folder_labels": true, | |
"color_scheme": "Packages/Monokai Extended/Monokai Extended.tmTheme", | |
"default_line_ending": "unix", | |
"drag_text": false, | |
"draw_minimap_border": true, | |
"enable_tab_scrolling": true, | |
"fade_fold_buttons": true, | |
"font_face": "Source Code Pro", | |
"font_size": 11, |
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
:: Uses 'jpegtran.exe' and 'pngout.exe'. Go Google them. | |
@echo none | |
for /d /r %%a in (*) do ( | |
pushd "%%a" | |
echo processing "%%a" | |
md "OptimizedJPEGS" | |
for %%i in (*.jpg) do "C:\imageoptimization\jpegtran.exe" -optimize -progressive -copy none "%%i" "OptimizedJPEGS\%%i" | |
move /Y "OptimizedJPEGS\*.*" . | |
rd "OptimizedJPEGS" | |
for %%i in (*.png) do "C:\imageoptimization\pngout.exe" "%%i" |