Skip to content

Instantly share code, notes, and snippets.

View masterfermin02's full-sized avatar
๐ŸŒŽ
Hello world!

Fermin Perdomo masterfermin02

๐ŸŒŽ
Hello world!
View GitHub Profile
function formatCedulaNumber(str) {
if (str.length < 3 && str.length < 11) {
return str;
}
if (str.length === 3) {
return str + '-';
}
if (str.length === 11) {
<?php
function searchMultiDimensionalArray($array, $key, $value) {
if(!is_array($array)) {
return preg_match("/$value/i", $array);
}
return array_filter($array, function($item) use ($key, $value){
return (isset($item[$key]) && !is_array($item[$key]) && preg_match("/$value/i", $item[$key]))
<?php
$data = json_decode('[
{
"id": 1,
"value1": 5,
"value2": 10
},
{
"id": 2,
<!-- The grid: four columns -->
<div class="row">
<div class="column">
<img src="https://cdn.pixabay.com/photo/2016/03/05/23/02/barbecue-1239434__480.jpg" alt="Nature" content="testing" onclick="myFunction(this);">
</div>
<div class="column">
<img src="https://cdn.pixabay.com/photo/2014/12/21/23/40/steak-575806__480.png" alt="Snow" content="testing" onclick="myFunction(this);">
</div>
<div class="column">
<img src="https://cdn.pixabay.com/photo/2020/02/02/15/07/meat-4813261__480.jpg" alt="Mountains" content="testing" onclick="myFunction(this);">
-- PE-13069 Seed data - PATCH
START TRANSACTION;
# Create some riders (9 riders)
INSERT INTO riders (id, active, first_name, last_name, email, password, salt, activation_token, region, phone_number, joined, registered_via_oauth_client_id, shipping_first_name, shipping_last_name, address_1, address_2, city, state, country, zip, shoe_size, bike_bar_height, bike_seat_height, bike_seat_distance, bike_handlebar_depth, bike_extended_handlebars, is_staff, emergency_contact_name, emergency_contact_phone, first_ride, series_vertical_redemption_enabled, notes, sent_first_bike_welcome_email, sent_post_first_ride_email, spotify_custom_playlist_uri, spotify_custom_playlist_link, new_rider_agreement_signed, state_text, gender, birthday, updated_at)
VALUES ('78791', '1', 'Eddy', 'Espinal', 'eespinal+member1@intellisys.com.do', 'aa259b0bdd3bc4e9d39bfa0dd7645ff103e68021', '5d640f914eb73', '5d640f914ed62', '1', '+12123829933', '2019-08-26 16:57:53', '1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-- PE-13003 Seed data - PATCH
START TRANSACTION;
# Create some riders (9 riders)
INSERT INTO riders (id, active, first_name, last_name, email, password, salt, activation_token, region, phone_number, joined, registered_via_oauth_client_id, shipping_first_name, shipping_last_name, address_1, address_2, city, state, country, zip, shoe_size, bike_bar_height, bike_seat_height, bike_seat_distance, bike_handlebar_depth, bike_extended_handlebars, is_staff, emergency_contact_name, emergency_contact_phone, first_ride, series_vertical_redemption_enabled, notes, sent_first_bike_welcome_email, sent_post_first_ride_email, spotify_custom_playlist_uri, spotify_custom_playlist_link, new_rider_agreement_signed, state_text, gender, birthday, updated_at)
VALUES ('78791', '1', 'Eddy', 'Espinal', 'eespinal+member1@intellisys.com.do', 'aa259b0bdd3bc4e9d39bfa0dd7645ff103e68021', '5d640f914eb73', '5d640f914ed62', '1', '+12123829933', '2019-08-26 16:57:53', '1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
mkdir empty_dir robocopy empty_dir the_dir_to_delete /s /mir rmdir empty_dir rmdir the_dir_to_delete
-- PE-11764 Seed data - PATCH
START TRANSACTION;
# Create some riders (9 riders)
INSERT INTO riders (id, active, first_name, last_name, email, password, salt, activation_token, region, phone_number, joined, registered_via_oauth_client_id, shipping_first_name, shipping_last_name, address_1, address_2, city, state, country, zip, shoe_size, bike_bar_height, bike_seat_height, bike_seat_distance, bike_handlebar_depth, bike_extended_handlebars, is_staff, emergency_contact_name, emergency_contact_phone, first_ride, series_vertical_redemption_enabled, notes, sent_first_bike_welcome_email, sent_post_first_ride_email, spotify_custom_playlist_uri, spotify_custom_playlist_link, new_rider_agreement_signed, state_text, gender, birthday, updated_at)
VALUES ('78791', '1', 'Eddy', 'Espinal', 'eespinal+member1@intellisys.com.do', 'aa259b0bdd3bc4e9d39bfa0dd7645ff103e68021', '5d640f914eb73', '5d640f914ed62', '1', '+12123829933', '2019-08-26 16:57:53', '1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
<?php
# copy right Fermin Perdomo
interface day {
public function whatYouDoing();
}
class Holiday implements day {
protected $dayName = "";
function factorial(number)
{
if(number < 1) return 1;
return number * factorial(number - 1);
}