Skip to content

Instantly share code, notes, and snippets.

View rhalp10's full-sized avatar
🇵🇭
Working from home

Rhalp Darren Cabrera rhalp10

🇵🇭
Working from home
  • rdrc.tech
  • Province of Cavite Trece Martires City, Philippines
  • 11:43 (UTC +08:00)
  • X @rhalp10
View GitHub Profile
@rhalp10
rhalp10 / convert.php
Created December 15, 2021 19:35
convert image url to blob php
//GET IMAGE LINK
$image_url = 'https://image.shutterstock.com/image-vector/sample-stamp-grunge-texture-vector-260nw-1389188336.jpg';
//CONVERT IMAGE LINK TO BLOB
$image_blob = 'data:image/jpeg;base64,'.base64_encode(file_get_contents($image_url));
//DISPLAY IMAGE BLOB AS IMAGE
echo '<img src="'.$image_blob.'" >';

Hey folks! 👋

My name is Rhalp,I've been using GitHub to host my repos for many years.

@rhalp10
rhalp10 / objectkey.txt
Last active September 17, 2020 11:57
AJAX Object.length undefined in JavaScript
IF YOU ARE HAVING PROBLEM ON USING AJAX JSON AND THE DATA IS "UNDEFINED" AND CANNOT COUNT THE LENGHT.
I WOULD RECOMMEND TO USE THIS.
var jsonDataFromAjax = {};
var keys = Object.keys(jsonDataFromAjax);
for (var i = 0, len = keys.length; i < len; i++) {
console.log(jsonDataFromAjax[keys[i]]);
}
cd C:\wamp64\www\intranet_laravel
:loop
php artisan schedule:run
timeout /t 10
goto loop
<!-- //BUTTON FOR REQUESTING DIFFERENT USER: pag click mag pupunta sa profile.php page -->
<a href="profile.php?userID=1" target="_blank">user_1</a>
<a href="profile.php?userID=2" target="_blank">user_2</a>
<!-- //PROFILE PAGE: -->
profile.php?userID=1
----------------------
<?php
function Chart(yearID) {
requestUri = _spPageContextInfo.webAbsoluteUrl + "/_api/lists/getbytitle('chart')/items?$filter=ID eq " + yearID + "";
$.ajax({
url: requestUri,
type: "GET",
headers: {
"ACCEPT": "application/json;odata=verbose"
},
success: function(data) {
@rhalp10
rhalp10 / chart.js
Created April 20, 2020 22:28
sharepoint chart using js
function Chart(yearID) {
requestUri = _spPageContextInfo.webAbsoluteUrl + "/_api/lists/getbytitle('chart')/items?$filter=ID eq " + yearID + "";
$.ajax({
url: requestUri,
type: "GET",
headers: {
"ACCEPT": "application/json;odata=verbose"
},
success: function(data) {
@rhalp10
rhalp10 / change
Last active April 3, 2020 22:15
MELOS THEME CHANGE FOR NAVIGATION
MELOS THEME CHANGE FOR NAVIGATION
style link (https://hipac.savegreenit.com/blog/wp-content/themes/melos/style.css?ver=1.3.4)
----------------
Modify #header-sticky .header-links > ul > li > .sub-menu #line 1182
- #line 1183 Add border-top: 2px solid #107FC9;
Modify #header-sticky .menu > li > a:hover #line 1243
- color change to #1eaaf1(light blue),
- and background: #fff(white)
- add font-weight:bold;
@rhalp10
rhalp10 / link_helper.php
Created December 17, 2019 09:00
codeigniter php file helper
@rhalp10
rhalp10 / playlist.md
Last active September 25, 2019 09:37
Python for Beginners [Microsoft Developer]

#Python for Beginners

Probably the largest hurdle when learning any new programming language is simply knowing where to get started. This is why we, Chris and Susan, decided to create this series about Python for Beginners!

Even though we won’t cover everything there is to know about Python in the course, we want to make sure we give you the foundation on programming in Python, starting from common everyday code and scenarios. At the end of the course, you’ll be able to go and learn on your own, for example with docs, tutorials, or books.

Microsoft Developer