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
// codigo kotlin made by anibal site: https://blog.anibalcopitan.com/2025/04/sms-largos-en-android-problema-y.html | |
/** | |
* Antes: | |
* Mensaje de yape: | |
* Yape! Victor A. Copitan N. te envió un pago por S/ 2. | |
*/ | |
// Antes | |
val smsManager: SmsManager = SmsManager.getDefault() |
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 parseDate(str) { | |
var mdy = str.split('-'); | |
return new Date(mdy[0], mdy[1]-1, mdy[2]); | |
} | |
function datediff(first, second) { | |
// Take the difference between the dates and divide by milliseconds per day. | |
// Round to nearest whole number to deal with DST. | |
return Math.round((second-first)/(1000*60*60*24)); | |
} |
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 | |
/* | |
* track logIn (save data in table metric) | |
*/ | |
add_action( 'wp_login', function($login, $user) { | |
if ( class_exists('\MinderOptions\Core\Chatbot') == true ) { | |
$keycode = 'sign_in'; | |
$stringValue = time(); // save time in UNIX format | |
$userId = $user->ID; | |
$rs = \MinderOptions\Core\Chatbot::saveCodeMetricByREST($keycode, $stringValue, $userId); |
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 | |
/** | |
* REF | |
* https://wordpress.stackexchange.com/questions/59435/how-to-get-current-user-name-by-user-id-in-buddypress | |
*/ | |
function get_display_name($user_id) { | |
if (!$user = get_userdata($user_id)) | |
return false; | |
return $user->data->display_name; |
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
let IDS = [ | |
["13a84e72-2d85-4852-9670-7adea92c8d4e", "1632326405429"], | |
["a010b860-7bd2-460e-8799-bc491670f294", "1632326405429"], | |
["1e543a6d-98e0-4150-b32a-097e688958b0", "1632326405429"], | |
["bc22a6e5-7545-40db-a0f6-3d63dc60be71", "1632326405429"], | |
["dcde6e06-3f84-4c4a-b6f3-f2787caf0677", "1632326405429"], | |
]; | |
let dynamoObject = { "UE1NPRODTESTDBADYNH2H014": [] }; | |
IDS.forEach(function(element, index) { |
Data necessary ('primary key' & shortkey) important
Ref = Delete several items at once on AWS DynamoDB using AWS CLI
- AWS CLI
- AWS Login
- node 14
- mysql
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 | |
$current_date = date_i18n('Y-m-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
/** | |
** Order values custom | |
** @ref with array = https://stackoverflow.com/questions/1069666/sorting-object-property-by-values | |
**/ | |
let obj = [{ id: 33, date: 333 }, { id: 11, date: 111 }, { id: 22, date: 222 }, { id: 0, date: 0 }]; | |
var sortable = []; | |
for (var index in obj) { | |
sortable.push([obj[index]['id'], obj[index]['date']]); | |
} |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# This Vagrantfile (vagrantup.com) spins up a MySQL server with your data | |
# already loaded. Many of the settings below are the same suggestions you get | |
# from `vagrant init`. | |
# | |
# Just be sure that (if you want data loaded) you have your .sql file sitting | |
# in the directory that will be shared to the guest. Usually this is the folder | |
# that your Vagrantfile is in. The database and user will have the same name as |
NewerOlder